Create an IStreamAlgoritm object from its SupportedStreamAlgorithms id.
Namespace: LLCryptoLib.CryptoAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
C# |
---|
public static IStreamAlgorithm Create( SupportedStreamAlgorithms ssa ) |
Visual Basic |
---|
Public Shared Function Create ( _ ssa As SupportedStreamAlgorithms _ ) As IStreamAlgorithm |
Visual C++ |
---|
public: static IStreamAlgorithm^ Create( SupportedStreamAlgorithms ssa ) |
Parameters
- ssa
- Type: LLCryptoLib.Crypto..::..SupportedStreamAlgorithms
SupportedStreamAlgorithms id
Return Value
A newly created IStreamAlgorithm object
Examples
Stream Encryption with DES
CopyC#

// Set encryption algorithm IStreamAlgorithm encryptAlgo = StreamAlgorithmFactory.Create(SupportedStreamAlgorithms.AES128); StreamCrypter encrypter = new StreamCrypter(encryptAlgo); // Set symmetric password encrypter.GenerateKeys("littlelitesoftware"); // Encrypt encrypter.EncryptDecrypt(rndFile.FullName, encryptedFile, true, null); Console.WriteLine("File encrypted into " + encryptedFile);