Skip to content

Instantly share code, notes, and snippets.

@cherenkov
Created July 18, 2012 09:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cherenkov/3135246 to your computer and use it in GitHub Desktop.
Save cherenkov/3135246 to your computer and use it in GitHub Desktop.
シーザー暗号 http://ideone.com/AOg6A
class String
def caesar; tr 'a-zA-Z', 'n-za-mN-ZA-M' end
def uncaesar; tr 'n-za-mN-ZA-M', 'a-zA-Z' end
end
print "unccl oveguqnl!".caesar
#パスワードにカエサル暗号(シーザー暗号)を使う。Rubyを使った場合:Garbage In Garbage Out
#http://g1g0.com/2012/01/523/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment