BN_div

Divide m by d, writing quotient and/or remainder.

Synopsis

Declared in <openssl/bn.h>

int
BN_div(
    BIGNUM* dv,
    BIGNUM* rem,
    BIGNUM const* m,
    BIGNUM const* d,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
dvReceives the quotient, or NULL if not required.
remReceives the remainder, or NULL if not required.
mDividend.
dDivisor (must be non-zero).
ctxBN_CTX scratch space.