Create an IStreamAlgoritm object from its description. Description must match the one defined in the StreamAlgorithm Description field.

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

Syntax

C#
public static IStreamAlgorithm Create(
	string description
)
Visual Basic
Public Shared Function Create ( _
	description As String _
) As IStreamAlgorithm
Visual C++
public:
static IStreamAlgorithm^ Create(
	String^ description
)

Parameters

description
Type: System..::..String
The description, as in StreamAlgorithm Description field

Return Value

A newly created IStreamAlgorithm object. If 'description' is not found, then returns null.

Examples

Stream Encryption with DES
CopyC#
// Set encryption algorithm
IStreamAlgorithm encryptAlgo = StreamAlgorithmFactory.Create("DES");
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);

See Also