Function esp_idf_svc::hal::sys::mbedtls_mpi_div_mpi

source ยท
pub unsafe extern "C" fn mbedtls_mpi_div_mpi(
    Q: *mut mbedtls_mpi,
    R: *mut mbedtls_mpi,
    A: *const mbedtls_mpi,
    B: *const mbedtls_mpi,
) -> i32
Expand description

\brief Perform a division with remainder of two MPIs: A = Q * B + R

\param Q The destination MPI for the quotient. This may be \c NULL if the value of the quotient is not needed. This must not alias A or B. \param R The destination MPI for the remainder value. This may be \c NULL if the value of the remainder is not needed. This must not alias A or B. \param A The dividend. This must point to an initialized MPI. \param B The divisor. This must point to an initialized MPI.

\return \c 0 if successful. \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. \return #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p B equals zero. \return Another negative error code on different kinds of failure.