HMAC keyed-hash message authentication code (in conjunction with: MD5,SHA1,SHA256,SHA384,SHA512)
|
SHARKSSL_API void | SharkSslHMACCtx_constructor (SharkSslHMACCtx *ctx, U8 hashID, const U8 *key, U16 keyLen) |
| Initialize. More...
|
|
SHARKSSL_API void | SharkSslHMACCtx_append (SharkSslHMACCtx *, const U8 *data, U32 len) |
| append
|
|
SHARKSSL_API void | SharkSslHMACCtx_finish (SharkSslHMACCtx *, U8 *HMAC) |
| finish
|
|
SHARKSSL_API int | sharkssl_HMAC (const U8 hashID, const U8 *data, U16 len, const U8 *key, U16 keyLen, U8 *digest) |
| HMAC. More...
|
|
◆ sharkssl_HMAC()
SHARKSSL_API int sharkssl_HMAC |
( |
const U8 |
hashID, |
|
|
const U8 * |
data, |
|
|
U16 |
len, |
|
|
const U8 * |
key, |
|
|
U16 |
keyLen, |
|
|
U8 * |
digest |
|
) |
| |
HMAC.
- Parameters
-
hashID | - the hash function to be used, can be one of: SHARKSSL_HASHID_MD5, SHARKSSL_HASHID_SHA1, SHARKSSL_HASHID_SHA256, SHARKSSL_HASHID_SHA384, SHARKSSL_HASHID_SHA512 |
data | pointer to the data to be hashed |
len | data length in bytes |
key | pointer to the cryptographic key |
keyLen | 'key' length |
digest | output HMAC |
◆ SharkSslHMACCtx_constructor()
SHARKSSL_API void SharkSslHMACCtx_constructor |
( |
SharkSslHMACCtx * |
ctx, |
|
|
U8 |
hashID, |
|
|
const U8 * |
key, |
|
|
U16 |
keyLen |
|
) |
| |
Initialize.
- Parameters
-
ctx | Uninitialized data of size sizeof(SharkSslHMACCtx). |
hashID | - the hash function to be used, can be one of: SHARKSSL_HASHID_MD5, SHARKSSL_HASHID_SHA1, SHARKSSL_HASHID_SHA256, SHARKSSL_HASHID_SHA384, SHARKSSL_HASHID_SHA512 |
key | pointer to the cryptographic key |
keyLen | 'key' length |