Function esp_idf_svc::hal::sys::psa_hash_update

source ยท
pub unsafe extern "C" fn psa_hash_update(
    operation: *mut psa_hash_operation_s,
    input: *const u8,
    input_length: usize,
) -> i32
Expand description

Add a message fragment to a multipart hash operation.

The application must call psa_hash_setup() before calling this function.

If this function returns an error status, the operation enters an error state and must be aborted by calling psa_hash_abort().

\param[in,out] operation Active hash operation. \param[in] input Buffer containing the message fragment to hash. \param input_length Size of the \p input buffer in bytes.

\retval #PSA_SUCCESS Success. \retval #PSA_ERROR_INSUFFICIENT_MEMORY \emptydescription \retval #PSA_ERROR_COMMUNICATION_FAILURE \emptydescription \retval #PSA_ERROR_HARDWARE_FAILURE \emptydescription \retval #PSA_ERROR_CORRUPTION_DETECTED \emptydescription \retval #PSA_ERROR_BAD_STATE The operation state is not valid (it must be active), or 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.