int SL_HASHCALL SL_HMAC_Final( void* pContext, void* pDest );
Nonzero if the function succeeds, otherwise 0. In particular, this function returns 0 when the context was improperly initialized.
[in/out] Pointer to the context.
[out] Pointer to the memory buffer that will receive the HMAC.
Call this function to retrieve the HMAC from the context pointed by pContext. The HMAC is retrieved in the memory buffer pointed by pDest. The size of the memory buffer pointed by pDest must be at least DIGESTSIZE bytes. DIGESTSIZE is a predefined constant that specifies the size of the HMAC for a specific hash algorithm. For example, you have to allocate at least SLC_RIPEMD160_DIGESTSIZE bytes for the memory buffer pointed by pDest if you need to calculate the HMAC using RIPEMD160 hash algorithm.
All supported hash algorithms with their corresponding DIGESTSIZEs are listed in Table1.
After the SL_HMAC_Final function is performed, the context is initialized for new calculations, as it would be called SL_HMAC_Init again.
Table1. Supported hash algorithms and their DIGESTSIZEs.
|Algorithm Name||Algorithm DIGESTSIZE|
HMAC API Overview | HMAC Functions | Useful Links | HashCalc
See Also SL_HMAC_FinalHex, SL_HMAC_Update, SL_HMAC_UpdateStr, SL_HMAC_Init, SL_HMAC_InitKeyStr
|Send Feedback to SlavaSoft Inc.||Tell a friend about QuickHash Library|