pub unsafe extern "C" fn mbedtls_ecp_write_key(
    key: *mut mbedtls_ecp_keypair,
    buf: *mut c_uchar,
    buflen: usize
) -> c_int
Expand description

\brief This function exports an elliptic curve private key.

\param key The private key. \param buf The output buffer for containing the binary representation of the key. (Big endian integer for Weierstrass curves, byte string for Montgomery curves.) \param buflen The total length of the buffer in bytes.

\return \c 0 on success. \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the \p key representation is larger than the available space in \p buf. \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.