Initializes the context with the key ready for repeated operations of Gcm.NextEncrypt, Gcm.NextDecrypt, or Gcm.NextGmac.
public int InitKey( byte[] key )
Public Function InitKey ( _ key As Byte() _ ) As Integer
0 if successful or non-zero error code
Once a key has been set up, Gcm.NextEncrypt, Gcm.NextDecrypt and Gcm.NextGmac can be used independently.
Gcm o = Instance(); o.InitKey(key); byte[] tag = new byte[16]; byte[] ct = o.NextEncrypt(tag, pt, iv, aad); //... o.Dispose();
See Example1
VB6/C equivalent: GCM_InitKey