Apply encryption algorithm to text. Output is a text string.
Namespace: LLCryptoLib.CryptoAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
C# |
---|
public string TextEncryptDecrypt(
string text,
bool coding
) |
Visual Basic |
---|
Public Function TextEncryptDecrypt ( _
text As String, _
coding As Boolean _
) As String |
Visual C++ |
---|
public:
String^ TextEncryptDecrypt(
String^ text,
bool coding
) |
Parameters
- text
- Type: System..::..String
Text to encode/decode
- coding
- Type: System..::..Boolean
If true, code, else decode
Return Value
Encrypted/Decrypted Text
Examples
CopyC#
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);
Console.WriteLine();
See Also