|
TI OAD API Documentation
9.14.00
|
Functions | |
| psa_status_t | psa_hash_resume (psa_hash_operation_t *operation, const uint8_t *hash_state, size_t hash_state_length) |
| Resume a previously suspended hash operation. More... | |
| psa_status_t | psa_hash_suspend (psa_hash_operation_t *operation, uint8_t *hash_state, size_t hash_state_size, size_t *hash_state_length) |
| Suspend an active hash operation. More... | |
| psa_status_t psa_hash_resume | ( | psa_hash_operation_t * | operation, |
| const uint8_t * | hash_state, | ||
| size_t | hash_state_length | ||
| ) |
Resume a previously suspended hash operation.
Set up a multi-part hash operation using the hash suspend state from a previously suspended hash operation.
| [in,out] | operation | The operation object to set up. It must have been initialized as per the documentation for psa_hash_operation_t and not yet in use. |
| [in] | hash_state | Buffer containing the suspended hash state which is to be resumed. |
| hash_state_length | Length of hash_state in bytes. |
| #PSA_SUCCESS | |
| #PSA_ERROR_NOT_SUPPORTED | |
| #PSA_ERROR_BAD_STATE | The operation state is not valid: it must be inactive. The library has not been previously initialized by psa_crypto_init(). It is implementation-dependent whether a failure to initialize results in this error code. |
| psa_status_t psa_hash_suspend | ( | psa_hash_operation_t * | operation, |
| uint8_t * | hash_state, | ||
| size_t | hash_state_size, | ||
| size_t * | hash_state_length | ||
| ) |
Suspend an active hash operation.
Halt the hash operation and extract the intermediate state of the hash computation.
| [in] | operation | Active hash operation. |
| [out] | hash_state | Buffer where the hash suspend state is to be written. |
| hash_state_size | Size of the hash_state buffer in bytes. This must be appropriate for the selected algorithm. | |
| [out] | hash_state_length | On success, the number of bytes that make up the hash suspend state. |
| #PSA_SUCCESS | Success. The first (*hash_state_length) bytes of hash_state contain the intermediate hash state. |
| #PSA_ERROR_NOT_SUPPORTED | |
| #PSA_ERROR_BUFFER_TOO_SMALL | The size of the hash_state buffer is too small. You can determine a sufficient buffer size by calling #PSA_HASH_SUSPEND_OUTPUT_SIZE(alg) where alg is the algorithm that was used to set up the operation. |
| #PSA_ERROR_BAD_STATE | The operation state is not valid: it must be active. The library has not been previously initialized by psa_crypto_init(). It is implementation-dependent whether a failure to initialize results in this error code. |
1.8.12