Namespace: CryptoSysAPIAssembly: diCrSysAPINet (in diCrSysAPINet.dll) Version: 6.22.2.24248 (6.22.2.0)
Syntaxpublic int InitKey(
byte[] key
)
Public Function InitKey (
key As Byte()
) As Integer
Parameters
- key Byte
- Key: must be exactly 16, 24 or 32 bytes long.
Return Value
Int32Zero (0) if successful; otherwise it returns a nonzero
error code
RemarksOnce a key has been set up,
Gcm.NextEncrypt, Gcm.NextDecrypt and Gcm.NextGmac can be used independently.
ExampleGcm o = Instance();
o.InitKey(key);
byte[] tag = new byte[16];
byte[] ct = o.NextEncrypt(tag, pt, iv, aad);
o.Dispose();
See Also