Initialises the MAC context ready for subsequent calls with
MAC_AddBytes
and MAC_Final
.
Public Declare Function MAC_Init Lib "diCryptoSys.dll" (ByRef lpKey As Byte, ByVal nKeyLen As Long, ByVal nAlg As Long) As Long
hContext = MAC_Init(lpKey, nKeyLen, nAlg)
long __stdcall MAC_Init(const void *lpKey, long nKeyLen, long nAlg);
Non-zero handle of the MAC context, or zero if an error occurs.
Public Function macInit
(lpKey() As Byte, nAlg As Long) As Long
bool crsysapi::Mac::Init (bvec_t key, Alg alg)
Only the HMAC-SHA-1 and HMAC-SHA-2 families of MAC algorithms are currently supported.
While the context handle is valid, add data to be digested in blocks of any length using MAC_AddBytes
.
VBA users can use the wrapper functions macAddBytes
and macAddString
.
See MAC_AddBytes
.