QuickHash Library Type Library


int HMAC_InitKeyStr( [ out ]HMAC_Context* pContext, [ in ]int nAlgID, [ in, string ]unsigned char* pKey );

Return value

Nonzero if initialization is successful, otherwise 0. In particular, this function returns 0 when nAlgID is invalid.



    [out] A memory buffer that will be used as a context.

     Note. All predefined types are specified in the Predefined Types List.


    [in] The ID of the hash algorithm selected for calculations. For example, nAlgID has to be set to SHA1_ALGID when you need to calculate the HMAC using SHA-1 hash algorithm.

    Note. All supported hash algorithms with their corresponding IDs are specified in the Predefined Constants List.


    [in] The key which represents a null-terminated string.


Initializes the context specified by pContext with the key specified by pKey.

Note. Before the first call to HMAC_Update, HMAC_UpdateStr, HMAC_Final or HMAC_FinalHex functions, the context must be initialized with HMAC_InitKeyStr or HMAC_Init.

VB Example

See the example for HMAC_UpdateStr.

Type Library Overview   |   Type Library Functions   |   Useful Links   |   HashCalc


See Also    HMAC_Final, HMAC_FinalHex, HMAC_Update, HMAC_UpdateStr, HMAC_Init



Send Feedback to SlavaSoft Inc. Tell a friend about QuickHash Library