Function esp_idf_svc::sys::mbedtls_mpi_div_int

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

\brief Perform a division with remainder of an MPI by an integer: 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. \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. \param A The dividend. This must point to an initialized MPi. \param b The divisor.

\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.