-
-
Save jason-s13r/3999414 to your computer and use it in GitHub Desktop.
enLOLcryption.
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
String.prototype.enlolcrypt2 = function () { | |
var cipher = "aeoiubcdfghjklmnpqrstvwxyz"; | |
return this.split("").map(function (T) { | |
var c = /[A-Z]/.test(T), T = T.toLowerCase(), i = cipher.indexOf(T); | |
if (/[^a-z]/.test(T)) { return T; } | |
if (/[aeoiu]/.test(T)) { | |
T = cipher[(i+2)%5]; | |
} else { | |
T = cipher[(i+5)%21+5]; | |
} | |
return c?T.toUpperCase():T; | |
}).join(""); | |
} | |
String.prototype.delolcrypt2 = function () { | |
var cipher = "aeoiubcdfghjklmnpqrstvwxyz"; | |
return this.split("").map(function (T) { | |
var c = /[A-Z]/.test(T), T = T.toLowerCase(), i = cipher.indexOf(T); | |
if (/[^a-z]/.test(T)) { return T; } | |
if (/[aeoiu]/.test(T)) { | |
T = cipher[(i-2)%5]; | |
} else { | |
T = cipher[(i-15)%21+5]; | |
} | |
return c?T.toUpperCase():T; | |
}).join(""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment