Function esp_idf_svc::sys::mbedtls_ecp_point_write_binary
source ยท pub unsafe extern "C" fn mbedtls_ecp_point_write_binary(
grp: *const mbedtls_ecp_group,
P: *const mbedtls_ecp_point,
format: i32,
olen: *mut usize,
buf: *mut u8,
buflen: usize,
) -> i32
Expand description
\brief This function exports a point into unsigned binary data.
\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 point to export. This must be initialized. \param format The point format. This must be either #MBEDTLS_ECP_PF_COMPRESSED or #MBEDTLS_ECP_PF_UNCOMPRESSED. (For groups without these formats, this parameter is ignored. But it still has to be either of the above values.) \param olen The address at which to store the length of the output in Bytes. This must not be \c NULL. \param buf The output buffer. This must be a writable buffer of length \p buflen Bytes. \param buflen The length of the output buffer \p buf in Bytes.
\return \c 0 on success. \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the output buffer is too small to hold the point. \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the point format or the export for the given group is not implemented. \return Another negative error code on other kinds of failure.