Caesar算法的3种实现
1、Ruby实现:caesar.rbdef encode(plaintext, offset) ciphertext = plaintext.dup for i in 0..(plaintext.length-1) if plaintext[i]>=?a && plaintext[i] ciphertext[i] = ?a + ((plaintext[i] - ?a + offset) %