Function esp_idf_svc::sys::mbedtls_mpi_write_binary_le

source ·
pub unsafe extern "C" fn mbedtls_mpi_write_binary_le(
    X: *const mbedtls_mpi,
    buf: *mut u8,
    buflen: usize,
) -> i32
Expand description

\brief Export X into unsigned binary data, little endian. Always fills the whole buffer, which will end with zeros if the number is smaller.

\param X The source MPI. This must point to an initialized MPI. \param buf The output buffer. This must be a writable buffer of length \p buflen Bytes. \param buflen The size of the output buffer \p buf in Bytes.

\return \c 0 if successful. \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if \p buf isn’t large enough to hold the value of \p X. \return Another negative error code on different kinds of failure.