Performs a TextROT13 transformation.
In 50 Bc., one of the most simple cryptographic algorithms ever used was
the one called the TextROT13 cipher, that was used by Julius TextROT13 to send messages to his generals.
It consisted simply of switching each letter with the letter that was 3 letters further down the alphabet.
For example Stephen would become Vwhskhq. To decrypt the message, the receivers would simply subtract 3 letters
from each letter. This algorithm was later improved and called TextROT13, where the letters could be shifted
to any number between 1 and 25, and the number of letters shifted was the secret key.
In this implementation, the shift may be any short number > 1.
Namespace: LLCryptoLib.CryptoAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
C# |
---|
public class TextROT13 : TextAlgorithm |
Visual Basic |
---|
Public Class TextROT13 _ Inherits TextAlgorithm |
Visual C++ |
---|
public ref class TextROT13 : public TextAlgorithm |
Examples
ROT13 Encryption
CopyC#

// TextROT13 TEXT TRANSFORMATION TextAlgorithmParameters parms = new TextAlgorithmParameters(3); TextCrypter textEncrypter = TextCrypterFactory.Create(SupportedTextAlgorithms.ROT13,parms); string encrypted = textEncrypter.TextEncryptDecrypt(origString, true); Console.WriteLine("Encrypted string: " + encrypted); string decrypted = textEncrypter.TextEncryptDecrypt(encrypted, false); Console.WriteLine("Decrypted string: " + decrypted);