You are viewing a single comment's thread. Return to all comments →
decoder = (("a".."z").zip(("a".."z").to_a.rotate k) + ("A".."Z").zip(("A".."Z").to_a.rotate k)).to_h print s.chars.map{|c| decoder.include?(c) ? decoder[c] : c}.join
Caesar Cipher
You are viewing a single comment's thread. Return to all comments →