Function esp_idf_svc::sys::mbedtls_mpi_mod_int
source ยท pub unsafe extern "C" fn mbedtls_mpi_mod_int(
r: *mut u32,
A: *const mbedtls_mpi,
b: i32,
) -> i32
Expand description
\brief Perform a modular reduction with respect to an integer. r = A mod b
\param r The address at which to store the residue. This must not be \c NULL. \param A The MPI to compute the residue of. This must point to an initialized MPi. \param b The integer base of the modular reduction.
\return \c 0 if successful. \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed. \return #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p b equals zero. \return #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p b is negative. \return Another negative error code on different kinds of failure.