Function esp_idf_svc::sys::mbedtls_ecp_point_read_binary
source ยท pub unsafe extern "C" fn mbedtls_ecp_point_read_binary(
grp: *const mbedtls_ecp_group,
P: *mut mbedtls_ecp_point,
buf: *const u8,
ilen: usize,
) -> i32
Expand description
\brief This function imports a point from unsigned binary data.
\note This function does not check that the point actually belongs to the given group, see mbedtls_ecp_check_pubkey() for that.
\note For compressed points, see #MBEDTLS_ECP_PF_COMPRESSED for limitations.
\param grp The group to which the point should belong. This must be initialized and have group parameters set, for example through mbedtls_ecp_group_load(). \param P The destination context to import the point to. This must be initialized. \param buf The input buffer. This must be a readable buffer of length \p ilen Bytes. \param ilen The length of the input buffer \p buf in Bytes.
\return \c 0 on success. \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the input is invalid. \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure. \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the import for the given group is not implemented.