Delegate for displaying advancement. This is a delegate to
call a piece of code whenever a certain event happens on
the main computing loop.
Namespace:
LLCryptoLibAssembly: LLCryptoLib (in LLCryptoLib.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Delegate Sub CallbackPoint ( _ p As Integer, _ message As String _ ) |
| C# |
|---|
public delegate void CallbackPoint( int p, string message ) |
| Visual C++ |
|---|
public delegate void CallbackPoint( int p, String^ message ) |
Parameters
- p
- Type: System..::.Int32
- message
- Type: System..::.String
Examples
Copy Code | |
|---|---|
|
//0. Update counter is a method with signature FeedbackExample(int i, string message) CallbackPoint cbp = new CallbackPoint(FeedbackExample.UpdateCounter); //1. Encrypt with Rijndael StreamARC4512 cryptAlgorithm = LLCryptoLib.Crypto.StreamAlgorithmFactory.ArcFour512; LLCryptoLib.Crypto.StreamCrypter crypter = new StreamCrypter(cryptAlgorithm); crypter.GenerateKeys("password"); string encryptedFile = rndFile.FullName + ".enc"; // here we use the CallbackPoint crypter.EncryptDecrypt(rndFile.FullName, encryptedFile, true, cbp); Console.WriteLine("File encrypted into " + encryptedFile); | |