207 #ifndef ti_drivers_SHA2__include 208 #define ti_drivers_SHA2__include 230 #define SHA2_STATUS_RESERVED (-32) 238 #define SHA2_STATUS_SUCCESS (0) 246 #define SHA2_STATUS_ERROR (-1) 256 #define SHA2_STATUS_RESOURCE_UNAVAILABLE (-2) 261 #define SHA2_STATUS_CANCELED (-3) 502 int_fast16_t
SHA2_addData(SHA2_Handle handle,
const void* data,
size_t length);
533 int_fast16_t
SHA2_hashData(SHA2_Handle handle,
const void* data,
size_t size,
void *digest);
557 int_fast16_t
SHA2_finalize(SHA2_Handle handle,
void *digest);
SHA2_Config * SHA2_Handle
A handle that is returned from an SHA2_open() call.
Definition: SHA2.h:363
SHA2_Handle SHA2_construct(SHA2_Config *config, const SHA2_Params *params)
Constructs a new SHA2 object.
SHA2_HashType hashType
Definition: SHA2.h:386
const SHA2_Config SHA2_config[]
Global SHA2 configuration struct.
void SHA2_reset(SHA2_Handle handle)
Clears internal buffers and aborts an ongoing SHA2 operation.
const uint_least8_t SHA2_count
Global SHA2 configuration count.
int_fast16_t SHA2_hashData(SHA2_Handle handle, const void *data, size_t size, void *digest)
Hashes a segment of data with a size in bytes and writes the resulting hash to digest.
const SHA2_Params SHA2_defaultParams
Default SHA2_Params structure.
SHA2 Global configuration.
Definition: SHA2.h:352
SHA2_ReturnBehavior returnBehavior
Definition: SHA2.h:389
void SHA2_init(void)
Initializes the SHA2 driver module.
int_fast16_t SHA2_addData(SHA2_Handle handle, const void *data, size_t length)
Adds a segment of data with a length in bytes to the cryptographic hash.
int_fast16_t SHA2_setHashType(SHA2_Handle handle, SHA2_HashType type)
Selects a new hash algorithm type.
void SHA2_close(SHA2_Handle handle)
Closes a SHA2 peripheral specified by handle.
uint32_t timeout
Definition: SHA2.h:391
SHA2_Handle SHA2_open(uint_least8_t index, const SHA2_Params *params)
Initializes a SHA2 driver instance and returns a handle.
SHA2_ReturnBehavior
The way in which SHA2 function calls return after performing an operation.
Definition: SHA2.h:284
SHA2_HashType
Enum for the hash types supported by the driver.
Definition: SHA2.h:304
SHA2_DigestLengthBytes
Enum for the hash digest lengths in bytes supported by the driver.
Definition: SHA2.h:314
int_fast16_t SHA2_finalize(SHA2_Handle handle, void *digest)
Finishes hash a operation and writes the result to digest.
void * object
Definition: SHA2.h:354
struct SHA2_Config SHA2_Config
SHA2 Global configuration.
int_fast16_t SHA2_cancelOperation(SHA2_Handle handle)
Aborts an ongoing SHA2 operation and clears internal buffers.
void const * hwAttrs
Definition: SHA2.h:357
SHA2_CallbackFxn callbackFxn
Definition: SHA2.h:390
SHA2 Parameters.
Definition: SHA2.h:385
void(* SHA2_CallbackFxn)(SHA2_Handle handle, int_fast16_t returnStatus)
The definition of a callback function used by the SHA2 driver when used in SHA2_RETURN_BEHAVIOR_CALLB...
Definition: SHA2.h:375
void SHA2_Params_init(SHA2_Params *params)
Initializes params with default values.
SHA2_BlockSizeBytes
Enum for the block sizes of the algorithms.
Definition: SHA2.h:334