IStreamAlgorithm. This is the base interface for file based/stream based encryption.

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

Syntax

C#
public interface IStreamAlgorithm
Visual Basic
Public Interface IStreamAlgorithm
Visual C++
public interface class IStreamAlgorithm

Examples

Encryption and decryption using stream algorithms:
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);

See Also