Function esp_idf_hal::sys::mbedtls_mpi_write_string
source ยท pub unsafe extern "C" fn mbedtls_mpi_write_string(
X: *const mbedtls_mpi,
radix: i32,
buf: *mut i8,
buflen: usize,
olen: *mut usize,
) -> i32
Expand description
\brief Export an MPI to an ASCII string.
\param X The source MPI. This must point to an initialized MPI. \param radix The numeric base of the output string. \param buf The buffer to write the string to. This must be writable buffer of length \p buflen Bytes. \param buflen The available size in Bytes of \p buf. \param olen The address at which to store the length of the string written, including the final \c NULL byte. This must not be \c NULL.
\note You can call this function with buflen == 0
to obtain the
minimum required buffer size in *olen
.
\return \c 0 if successful.
\return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if the target buffer \p buf
is too small to hold the value of \p X in the desired base.
In this case, *olen
is nonetheless updated to contain the
size of \p buf required for a successful call.
\return Another negative error code on different kinds of failure.