QuickHash Library Type Library

HMAC_Init

int HMAC_Init( [ out ]HMAC_Context* pContext, int nAlgID, [ in, size_is( nKeyLength ) ] const void* pKey, [ in ]int nKeyLength );

Return value

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

Parameters

pContext

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

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

nAlgID

    [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.

 pKey

    [in] The key which represents a continuous memory block.

 nKeyLength

    [in] Length in bytes of the key.

Remarks

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_Init or HMAC_InitKeyStr.

VB Example

See the example for HMAC_Final.

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

 

See Also    HMAC_InitKeyStr, HMAC_Final, HMAC_FinalHex, HMAC_Update, HMAC_UpdateStr


 

 

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