Initializes the context with the key and algorithm ready for repeated incremental operations
Namespace: CryptoSysAPIAssembly: diCrSysAPINet (in diCrSysAPINet.dll) Version: 6.22.2.24248 (6.22.2.0)
Syntaxpublic int InitKey(
byte[] key,
AeadAlgorithm alg
)
Public Function InitKey (
key As Byte(),
alg As AeadAlgorithm
) As Integer
Parameters
- key Byte
- Key of exact length for given algorithm (16 or 32 bytes).
- alg AeadAlgorithm
- AEAD algorithm to use
Return Value
Int32Zero (0) if successful; otherwise it returns a nonzero
error code
RemarksMust be followed by
SetNonce().
Can be called at any time to cancel any previous incremental settings.
ExampleAead o = Aead.Instance();
o.InitKey(key, alg);
o.SetNonce(nonce);
o.Dispose();
See Also