BN_nnmod

Compute a non-negative remainder r = m mod d (0 <= r < |d|).

Synopsis

Declared in <openssl/bn.h>

int
BN_nnmod(
    BIGNUM* r,
    BIGNUM const* m,
    BIGNUM const* d,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
rDestination remainder.
mDividend.
dModulus (must be non-zero).
ctxBN_CTX scratch space.