Created
July 27, 2010 14:37
-
-
Save cowboy/492307 to your computer and use it in GitHub Desktop.
ROT13
This file contains hidden or 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
| // "Maximum encryption" | |
| function rot13( str ) { | |
| return ( str || '' ).replace( /[a-z]/ig, function(a){ | |
| var n = a.charCodeAt(0); | |
| return String.fromCharCode(n>109||n<97&&n>77?n-13:n+13); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment