Generate keys starting from a string password. This method transforms a normal string into a strong password
by applying hash trasformation on that. The strong password is
then used to create the key vector and the block vector to
run the algorithm.
Namespace: LLCryptoLib.CryptoAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
C# |
---|
public void GenerateKeys(
string password
) |
Visual Basic |
---|
Public Sub GenerateKeys ( _
password As String _
) |
Visual C++ |
---|
public:
void GenerateKeys(
String^ password
) |
Parameters
- password
- Type: System..::..String
a given password
Examples
CopyC#
IStreamAlgorithm cryptoAlgo = StreamAlgorithmFactory.Create(SupportedStreamAlgorithms.BLOWFISH);
StreamCrypter crypter = new StreamCrypter(cryptoAlgo);
crypter.GenerateKeys("littlelitesoftware");
crypter.EncryptDecrypt(rndFile.FullName, encryptedFile, true, null);
Console.WriteLine("File encrypted into " + encryptedFile);
StreamCrypter decrypter = new StreamCrypter(cryptoAlgo);
crypter.GenerateKeys("littlelitesoftware");
crypter.EncryptDecrypt(encryptedFile, decryptedFile, false, null);
Console.WriteLine("File decrypted into " + decryptedFile);
See Also