SharkSSL™ Embedded SSL/TLS Stack
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

HMAC keyed-hash message authentication code (in conjunction with: MD5,SHA1,SHA256,SHA384,SHA512) More...

Data Structures

struct  SharkSslHMACCtx
 HMAC. More...
 

Typedefs

typedef struct SharkSslHMACCtx SharkSslHMACCtx
 HMAC.
 

Functions

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...
 

Detailed Description

HMAC keyed-hash message authentication code (in conjunction with: MD5,SHA1,SHA256,SHA384,SHA512)

Function Documentation

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
datapointer to the data to be hashed
lendata length in bytes
keypointer to the cryptographic key
keyLen'key' length
digestoutput HMAC
SHARKSSL_API void SharkSslHMACCtx_constructor ( SharkSslHMACCtx ctx,
U8  hashID,
const U8 *  key,
U16  keyLen 
)

Initialize.

Parameters
ctxUninitialized 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
keypointer to the cryptographic key
keyLen'key' length