This class wraps the operations on encryption streams.

Namespace: LLCryptoLib.Crypto
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public class StreamCrypter
Visual Basic
Public Class StreamCrypter
Visual C++
public ref class StreamCrypter

Examples

CopyC#
// 1. Set algorithm
IStreamAlgorithm cryptoAlgo = StreamAlgorithmFactory.Create(SupportedStreamAlgorithms.BLOWFISH);

// 2. Encrypt 
StreamCrypter crypter = new StreamCrypter(cryptoAlgo);
crypter.GenerateKeys("littlelitesoftware");
crypter.EncryptDecrypt(rndFile.FullName, encryptedFile, true, null);
Console.WriteLine("File encrypted into " + encryptedFile);

// 3. Decrypt
StreamCrypter decrypter = new StreamCrypter(cryptoAlgo);
crypter.GenerateKeys("littlelitesoftware");
crypter.EncryptDecrypt(encryptedFile, decryptedFile, false, null);
Console.WriteLine("File decrypted into " + decryptedFile);

Inheritance Hierarchy

System..::..Object
  LLCryptoLib.Crypto..::..StreamCrypter

See Also