rot13

! NOTE: ROT13 isn't designed to be secure, it's designed to hide text that can be cracked very easily. It is popular as a spoiler hider on some old-school forums and newsgroups.

Downloadrot13(str)   Returns the given text encrypted/decrypted with the rot13 algorithm.
/*
**  Usage:
**      rot13(str)
**
**  Arguments:
**      str     text to be encrypted/decrypted
**
**  Returns:
**      the given text encrypted/decrypted with the rot13 algorithm
**
**  Notes:
**      Only works for letters, that means no numbers, symbols, spaces, etc.
**
**  GMLscripts.com
*/

{
    var a,b,str,len,val,i;
    a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
    b = "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm";
    str = string_letters(argument0);
    len = string_length(str);
    val = "";
    for (i=1; i<=len; i+=1)
    val += string_char_at(b,string_pos(string_char_at(str,i),a));
    return val;
}

Click if you've used this script[Please Login]
Projects: 3

 Contributor: Austin


comments powered by Disqus