ROT13 Substitution Cipher

"Somebody will be able to overcome any encryption technique you use!" // Noam Chomsky

ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple letter substitution cipher that replaces a letter with the 13th letter after it, in the alphabet. Because there are 26 letters (2×13) in the basic Latin alphabet, ROT13 is its own inverse; that is, to undo ROT13, the same algorithm is applied, so the same action can be used for encoding and decoding. The algorithm provides virtually no cryptographic security, and is often cited as a canonical example of weak encryption.

Write a CC that takes any string and returns the ROT13 version of the string; you may assume that the character set is ASCII and let "space" character be counted as well. If there are any numbers, don't use them in the ciphering process. What is the meaning of “lntcqo vf gur orfg obg va qvfpbeq

Example solution

Last updated