CryptoSys API Library Manual
macInit
Initialises the MAC context ready to receive data to authenticate.
Syntax
[VBA]
Public Function macInit ( _
lpKey() As Byte, _
nAlg As Long _
) As Long
Parameters
- lpKey
- Key in byte format.
- nAlg
- Algorithm to be used. Select one from:
API_HMAC_SHA1
API_HMAC_SHA224
API_HMAC_SHA256
API_HMAC_SHA384
API_HMAC_SHA512
Return Value
Long: Nonzero handle of the MAC context, or zero if an error occurs.
Remarks
Once initialized, use the context for subsequent calls to macAddBytes
, macAddString
and macFinal
.