ePass1000 C/C++ API Reference Manual Version 2.0

# MD5_HMAC

The MD5_HMAC function performs the MD5 HMAC translate.

    unsigned char* __stdcall
    MD5_HMAC(
        unsigned char* pucText,       // [in]
        unsigned long ulText_Len,     // [in]
        unsigned char* pucKey,        // [in]
        unsigned long ulKey_Len,      // [in]
        unsigned char* pucKey1,       // [in]
        unsigned char* pucKey2,       // [in]
        unsigned char* pucDigest      // [out]
    );

#### Parameters

pucText
  [in] Points to the input data stream, and not exceed 55 bytes.
ulText_Len
  [in] Size of the input data stream, and not exceed 55 bytes.
pucKey
  [in] Points to the secret.
ulKey_Len
  [in] size of type secret.
pucKey1
  [in] NULL or pointer to an array of 16 bytes that receives MD5 (SECRET XOR iPad).
iPad = the byte 0x36 repeated 64 times.
pucKey2
  [in] NULL or a pointer to an array of 16 bytes that receives MD5(SECRET XOR oPad).
oPad = the byte 0x5C repeated 64 times.
pucDigest
  [out] Pointer to a 16-byte buffer that receives the message digest.

#### Remark

HMAC-MD5 algorithm is defined in RFC-2085, you may found this document on http://www.rfc-editor.org/rfc/rfc2085.txt.

#### Return Values

This function returns a pointer to the digest buffer.

#### See Also

MD5_Hash