dp14txss
Vitis Drivers API Documentation
|
This file contains the implementation of the HMAC Hash Message Authentication Code.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 MH 10/30/15 First Release
Macros | |
#define | SHA256_SIZE 256/8 |
SHA256 Hash size. More... | |
Functions | |
int | XHdcp22Cmn_HmacSha256Hash (const u8 *Data, int DataSize, const u8 *Key, int KeySize, u8 *HashedData) |
This function does a HMAC_SHA256 transform: SHA256(K XOR opad, SHA256(K XOR ipad, text)) More... | |
#define SHA256_SIZE 256/8 |
SHA256 Hash size.
Referenced by XHdcp22Cmn_HmacSha256Hash().
int XHdcp22Cmn_HmacSha256Hash | ( | const u8 * | Data, |
int | DataSize, | ||
const u8 * | Key, | ||
int | KeySize, | ||
u8 * | HashedData | ||
) |
This function does a HMAC_SHA256 transform: SHA256(K XOR opad, SHA256(K XOR ipad, text))
ipad is the byte 0x36 repeated 64 times opad is the byte 0x5c repeated 64 times and text is the data being protected
Data | is the input data. |
DataSize | is the size of the data buffer. |
Key | is the hash-key to use. |
KeySize | is the size of the hash key. |
HashedData | is the output of this function. |
References SHA256_SIZE, and XHdcp22Cmn_Sha256Hash().