This article is from the alt-sources-mac FAQ, by Mark Pilgrim (f8dy@netaxs.com) with numerous contributions by others.
Since alt.sources.mac is exclusively for posting Macintosh source code, here
is some C code to convert a char to its rot-13 equivalent:
unsigned char Rot13(unsigned char theChar)
{
return (((theChar|0x20)<'a') || ((theChar|0x20)>'z')) ? theChar :
((theChar|0x20)<='m') ? theChar+13 : theChar-13;
}
 
Continue to: