mbed TLS v2.23.0

Typedefs
Hardware-Accelerated Message Digests

Generation and authentication of Message Digests (aka hashes) must be done in parts using the following sequence: More...

## Typedefs
typedef struct psa_drv_hash_context_s | psa_drv_hash_context_t
| The hardware-specific hash context structure. More...
typedef psa_status_t(* | psa_drv_hash_setup_t) (psa_drv_hash_context_t *p_context)
| The function prototype for the start operation of a hash (message digest) operation. More...
typedef psa_status_t(* | psa_drv_hash_update_t) (psa_drv_hash_context_t *p_context, const uint8_t *p_input, size_t input_length)
| The function prototype for the update operation of a hash (message digest) operation. More...
typedef psa_status_t(* | psa_drv_hash_finish_t) (psa_drv_hash_context_t *p_context, uint8_t *p_output, size_t output_size, size_t *p_output_length)
| The function prototype for the finish operation of a hash (message digest) operation. More...
typedef void(* | psa_drv_hash_abort_t) (psa_drv_hash_context_t *p_context)
| The function prototype for the abort operation of a hash (message digest) operation. More...

## Detailed Description

Generation and authentication of Message Digests (aka hashes) must be done in parts using the following sequence:

- `psa_drv_hash_setup_t`
- `psa_drv_hash_update_t`
- `psa_drv_hash_update_t`
- ...
- `psa_drv_hash_finish_t`

If a previously started Message Digest operation needs to be terminated before the `psa_drv_hash_finish_t` operation is complete, it should be aborted by the `psa_drv_hash_abort_t`. Failure to do so may result in allocated resources not being freed or in other undefined behavior.

## Typedef Documentation

## ◆ psa_drv_hash_abort_t

typedef void(* psa_drv_hash_abort_t) (psa_drv_hash_context_t *p_context)

The function prototype for the abort operation of a hash (message digest) operation.

Functions that implement this prototype should be named in the following convention:

psa_drv_hash_<ALGO>_abort

Where `ALGO` is the name of the underlying algorithm

Parameters

  [in,out] | p_context | A hardware-specific structure for the previously started hash operation to be aborted

Definition at line 144 of file crypto_accel_driver.h.

## ◆ psa_drv_hash_context_t

typedef struct psa_drv_hash_context_s psa_drv_hash_context_t

The hardware-specific hash context structure.

The contents of this structure are implementation dependent and are therefore not described here

Definition at line 1 of file crypto_accel_driver.h.

## ◆ psa_drv_hash_finish_t

typedef psa_status_t(* psa_drv_hash_finish_t) (psa_drv_hash_context_t *p_context, uint8_t *p_output, size_t output_size, size_t *p_output_length)

The function prototype for the finish operation of a hash (message digest) operation.

Functions that implement this prototype should be named in the following convention:

psa_drv_hash_<ALGO>_finish

Where `ALGO` is the name of the underlying algorithm

Parameters

  [in,out] | p_context | A hardware-specific structure for the previously started hash operation to be fiinished
  [out] | p_output | A buffer where the generated digest will be placed
  [in] | output_size | The size in bytes of the buffer that has been allocated for the `p_output` buffer
  [out] | p_output_length | The number of bytes placed in `p_output` after success

Return values

  PSA_SUCCESS | Success.

Definition at line 126 of file crypto_accel_driver.h.

## ◆ psa_drv_hash_setup_t

typedef psa_status_t(* psa_drv_hash_setup_t) (psa_drv_hash_context_t *p_context)

The function prototype for the start operation of a hash (message digest) operation.

Functions that implement this prototype should be named in the following convention:

psa_drv_hash_<ALGO>_setup

Where `ALGO` is the name of the underlying hash function

Parameters

  [in,out] | p_context | A structure that will contain the hardware-specific hash context

Return values

  PSA_SUCCESS | Success.

Definition at line 80 of file crypto_accel_driver.h.

## ◆ psa_drv_hash_update_t

typedef psa_status_t(* psa_drv_hash_update_t) (psa_drv_hash_context_t *p_context, const uint8_t *p_input, size_t input_length)

The function prototype for the update operation of a hash (message digest) operation.

Functions that implement this prototype should be named in the following convention:

psa_drv_hash_<ALGO>_update

Where `ALGO` is the name of the underlying algorithm

Parameters

  [in,out] | p_context | A hardware-specific structure for the previously-established hash operation to be continued
  [in] | p_input | A buffer containing the message to be appended to the hash operation
  [in] | input_length | The size in bytes of the input message buffer

Definition at line 99 of file crypto_accel_driver.h.