int HMAC_CalculateStrHex( [ in ] int
nAlgID, [ out ]HMAC_HexDigest* pDigest, [ in,string
]unsigned char* pSrc, [ in, string ]unsigned char* pKey,
[ in ]boolean bUpper );
Nonzero if calculation is successful, otherwise 0. In particular, this
function returns 0 when nAlgID is invalid.
[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.
[out] A memory
buffer that will receive the HMAC as an ASCII null-terminated string.
Note. All predefined types are specified in the
Predefined Types List.
null-terminated string for which to calculate the HMAC.
[in] The key which represents a
[in] Uppercase flag.
If bUpper is False, the received HMAC represents a lowercase
string, otherwise it represents an uppercase string.
Calculates the HMAC for the null-terminated string
specified by pSrc using the key specified by pKey. The HMAC is
retrieved as an ASCII null-terminated hexadecimal string in the pDigest
Private Sub MyButton_Click()
Dim Hmac As HMAC_HexDigest
Dim MyStrData As String
MyStrData = "Hello World!"
Dim MyStrKey As String
MyStrKey = "password"
'Get the MD5-HMAC
HMAC_CalculateStrHex MD5_ALGID, Hmac, MyStrData, MyStrKey, True
'Show the hexadecimal representation of the MD5-HMAC
Type Library Overview
| Type Library Functions
Useful Links | HashCalc