Function esp_idf_sys::psa_key_derivation_input_integer
source · pub unsafe extern "C" fn psa_key_derivation_input_integer(
operation: *mut psa_key_derivation_operation_t,
step: psa_key_derivation_step_t,
value: u64,
) -> psa_status_t
Expand description
Provide a numeric input for key derivation or key agreement.
Which inputs are required and in what order depends on the algorithm. However, when an algorithm requires a particular order, numeric inputs usually come first as they tend to be configuration parameters. Refer to the documentation of each key derivation or key agreement algorithm for information.
This function is used for inputs which are fixed-size non-negative integers.
If this function returns an error status, the operation enters an error state and must be aborted by calling psa_key_derivation_abort().
\param[in,out] operation The key derivation operation object to use. It must have been set up with psa_key_derivation_setup() and must not have produced any output yet. \param step Which step the input data is for. \param[in] value The value of the numeric input.
\retval #PSA_SUCCESS Success. \retval #PSA_ERROR_INVALID_ARGUMENT \c step is not compatible with the operation’s algorithm, or \c step does not allow numeric inputs. \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_STORAGE_FAILURE \emptydescription \retval #PSA_ERROR_BAD_STATE The operation state is not valid for this input \p step, 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.