SDU Tools: ROT13 Encode and Decode in SQL Server T-SQL
If you used computers much in the 1980’s or 1990’s you’ll remember jokes that circulated all the time, but encoded in ROT13. It was a type of Caesar Cypher or Shift Cypher where the letters in the original words were shifted by a fixed number of positions in the alphabet to create the cyphertext.
ROT13 was a specific type of shift cypher where, for our alphabet of 26 characters, a 13 character shift is applied. That means that the same function can be used to encode text and then to decode the same text.
2019-10-02