SEcube
SEcube Open Source Library - Device
HMAC-SHA256 functions

HMAC-SHA256 functions

int32_t B5_HmacSha256_Init (B5_tHmacSha256Ctx *ctx, const uint8_t *Key, int16_t keySize)
 Initialize the HMAC-SHA256 context. More...
 
int32_t B5_HmacSha256_Update (B5_tHmacSha256Ctx *ctx, const uint8_t *data, int32_t dataLen)
 Compute the HMAC-SHA256 algorithm on input data depending on the current status of the HMAC-SHA256 context. More...
 
int32_t B5_HmacSha256_Finit (B5_tHmacSha256Ctx *ctx, uint8_t *rDigest)
 De-initialize the current HMAC-SHA256 context. More...
 

Detailed Description

Function Documentation

int32_t B5_HmacSha256_Finit ( B5_tHmacSha256Ctx ctx,
uint8_t *  rDigest 
)

De-initialize the current HMAC-SHA256 context.

Parameters
ctxPointer to the HMAC-SHA256 context to de-initialize.
rDigestPointer to a blank memory area that can store the computed output digest.
Returns
See HMAC-SHA256 return values .
int32_t B5_HmacSha256_Init ( B5_tHmacSha256Ctx ctx,
const uint8_t *  Key,
int16_t  keySize 
)

Initialize the HMAC-SHA256 context.

Parameters
ctxPointer to the HMAC-SHA256 data structure to be initialized.
KeyPointer to the Key that must be used.
keySizeKey size.
Returns
See HMAC-SHA256 return values .
int32_t B5_HmacSha256_Update ( B5_tHmacSha256Ctx ctx,
const uint8_t *  data,
int32_t  dataLen 
)

Compute the HMAC-SHA256 algorithm on input data depending on the current status of the HMAC-SHA256 context.

Parameters
ctxPointer to the current HMAC-SHA256 context.
dataPointer to the input data.
dataLenBytes to be processed.
Returns
See HMAC-SHA256 return values .