|
QuickHash Library |
Type Library |
|
QHASH_StringHexHMAC
BSTR QHASH_StringHexHMAC( [ in ] int nAlgID, [ in , string ]
unsigned char* pSrc,[ in , string ] unsigned char* pKey,
[ in ] boolean bUpper );
Return value
The hexadecimal representation of the HMAC.
Parameters
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.
pSrc
[in] A null-terminated
string for which to calculate the HMAC.
pKey
[in] The key which represents a
null-terminated string.
bUpper
[in] Uppercase flag. If bUpper
is False, the received HMAC represents a lowercase string,
otherwise it represents an uppercase string.
Remarks
Calculates the HMAC for the null-terminated string
specified by pSrc using the key specified by pKey. The HMAC is returned as a
hexadecimal string.
Note. If the result is an empty string call
QHASH_GetLastError
function for the error code.
VB Example
Private Sub MyButton_Click()
'Calculate and Show the MD5-HMAC in hexadecimal representation
MsgBox QHASH_StringHexHMAC(MD5_ALGID, "Hello World!", "password", True)
End Sub
|
|
Type Library Overview
| Type Library Functions
|
Useful Links | HashCalc
See Also
QHASH_StringHMAC,
QHASH_BlockHexHMAC,
QHASH_FileHexHMAC,
QHASH_GetLastError
|