Function esp_idf_sys::mbedtls_ecjpake_write_shared_key
source · pub unsafe extern "C" fn mbedtls_ecjpake_write_shared_key(
ctx: *mut mbedtls_ecjpake_context,
buf: *mut c_uchar,
len: usize,
olen: *mut usize,
f_rng: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut c_uchar, arg3: usize) -> c_int>,
p_rng: *mut c_void,
) -> c_int
Expand description
\brief Write the shared key material to be passed to a Key Derivation Function as described in RFC8236.
\param ctx The ECJPAKE context to use. This must be initialized, set up and have performed both round one and two. \param buf The buffer to write the derived secret to. This must be a writable buffer of length \p len Bytes. \param len The length of \p buf in Bytes. \param olen The address at which to store the total number of bytes written to \p buf. This must not be \c NULL. \param f_rng The RNG function to use. This must not be \c NULL. \param p_rng The RNG parameter to be passed to \p f_rng. This may be \c NULL if \p f_rng doesn’t use a context.
\return \c 0 if successful. \return A negative error code on failure.