SharkSSL™ Embedded SSL/TLS Stack

Detailed Description

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

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

Function Documentation

◆ 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
datapointer to the data to be hashed
lendata length in bytes
keypointer to the cryptographic key
keyLen'key' length
digestoutput HMAC

◆ SharkSslHMACCtx_constructor()

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