Function esp_idf_hal::sys::mbedtls_mpi_mod_mpi
source ยท pub unsafe extern "C" fn mbedtls_mpi_mod_mpi(
R: *mut mbedtls_mpi,
A: *const mbedtls_mpi,
B: *const mbedtls_mpi,
) -> i32
Expand description
\brief Perform a modular reduction. R = A mod B
\param R The destination MPI for the residue value. This must point to an initialized MPI. \param A The MPI to compute the residue of. This must point to an initialized MPI. \param B The base of the modular reduction. This must point to an initialized MPI.
\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.