Created
July 18, 2012 09:30
-
-
Save cherenkov/3135246 to your computer and use it in GitHub Desktop.
シーザー暗号 http://ideone.com/AOg6A
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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