SigV4 v1.0.0
SigV4 Library for AWS Authentication
SigV4CryptoInterface_t Struct Reference

The cryptography interface used to supply the user-defined hash implementation. More...

#include <sigv4.h>

Data Fields

int32_t(* hashInit )(void *pHashContext)
 Initializes the pHashContext. More...
 
int32_t(* hashUpdate )(void *pHashContext, const uint8_t *pInput, size_t inputLen)
 Calculates an ongoing hash update (SHA-256, for example). More...
 
int32_t(* hashFinal )(void *pHashContext, uint8_t *pOutput, size_t outputLen)
 Calculates the final binary digest of the hash from the context. More...
 
void * pHashContext
 Context for the hashInit, hashUpdate, and hashFinal interfaces.
 
size_t hashBlockLen
 The block length of the hash function.
 
size_t hashDigestLen
 The digest length of the hash function.
 

Detailed Description

The cryptography interface used to supply the user-defined hash implementation.

Field Documentation

◆ hashInit

int32_t(* SigV4CryptoInterface_t::hashInit) (void *pHashContext)

Initializes the pHashContext.

Parameters
[in]pHashContextContext used to maintain the hash's current state during incremental updates.
Returns
Zero on success, all other return values are failures.

◆ hashUpdate

int32_t(* SigV4CryptoInterface_t::hashUpdate) (void *pHashContext, const uint8_t *pInput, size_t inputLen)

Calculates an ongoing hash update (SHA-256, for example).

Parameters
[in]pHashContextContext used to maintain the hash's current state during incremental updates.
[in]pInputBuffer holding the data to hash.
[in]inputLenlength of the input buffer data.
Returns
Zero on success, all other return values are failures.

◆ hashFinal

int32_t(* SigV4CryptoInterface_t::hashFinal) (void *pHashContext, uint8_t *pOutput, size_t outputLen)

Calculates the final binary digest of the hash from the context.

Parameters
[in]pHashContextContext used to maintain the hash's current state during incremental updates.
[out]pOutputThe buffer used to place final hash binary digest output.
[in]outputLenThe length of the pOutput buffer, which must be larger than the hash digest length specified in SIGV4_HASH_MAX_DIGEST_LENGTH.
Returns
Zero on success, all other return values are failures.

The documentation for this struct was generated from the following file: