Function esp_idf_sys::mbedtls_ecp_read_key
source ยท pub unsafe extern "C" fn mbedtls_ecp_read_key(
grp_id: mbedtls_ecp_group_id,
key: *mut mbedtls_ecp_keypair,
buf: *const c_uchar,
buflen: usize,
) -> c_int
Expand description
\brief This function reads an elliptic curve private key.
\param grp_id The ECP group identifier. \param key The destination key. \param buf The buffer containing the binary representation of the key. (Big endian integer for Weierstrass curves, byte string for Montgomery curves.) \param buflen The length of the buffer in bytes.
\return \c 0 on success. \return #MBEDTLS_ERR_ECP_INVALID_KEY error if the key is invalid. \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the operation for the group is not implemented. \return Another negative error code on different kinds of failure.