ePass1000 C/C++ API Reference Manual Version 2.0 |
The epas_HashToken function performs a message hash on the currently opened file.
EPAS_STATUS EPAS_API epas_HashToken( EPAS_HANDLE hContextHandle, // [in] unsigned long ulFlags, // [in] unsigned long ulRefData, // [in] unsigned char* pucBuffer, // [in] unsigned long ulBufferSize, // [in] unsigned char* pucResponse, // [out] unsigned long ulRespSize, // [in] unsigned long* pulReturnedBytes // [out] );
epas_CreateContext, epas_OpenDevice, epas_OpenFile
Flag | Meaning |
---|---|
EPAS_HASH_MD5_HMAC |
This flag performs the following on the currently opened file: 1. Initialize the MD5 hash state with the token. 2. If length of input buffer is less than 64 bytes, perform MD5 final padding. 3. Update MD5 hash state with pucBuffer. 4. Return the hash state in the pucResponse buffer. Note: MD5 HMAC requires two files. The first file is the currently opened file, The second file ID is defined in ulRefData. |
The size of the challenge input which pointed by pucBuffer cannot exceed 55 bytes.
If the function succeeds, FT_SUCCESS returned.
If appropriate file access has not granted or no opened file, FT_ACCESS_DENIED returned.
For a list of all return codes, see Status Return Values.