Function esp_idf_svc::hal::sys::psa_key_derivation_set_capacity

source ·
pub unsafe extern "C" fn psa_key_derivation_set_capacity(
    operation: *mut psa_key_derivation_s,
    capacity: usize,
) -> i32
Expand description

Set the maximum capacity of a key derivation operation.

The capacity of a key derivation operation is the maximum number of bytes that the key derivation operation can return from this point onwards.

\param[in,out] operation The key derivation operation object to modify. \param capacity The new capacity of the operation. It must be less or equal to the operation’s current capacity.

\retval #PSA_SUCCESS \emptydescription \retval #PSA_ERROR_INVALID_ARGUMENT \p capacity is larger than the operation’s current capacity. In this case, the operation object remains valid and its capacity remains unchanged. \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.