[#BN_nnmod]
= BN&lowbar;nnmod
:mrdocs:

Compute a non&hyphen;negative remainder `r` &equals; `m` mod `d` (0 &lt;&equals; r &lt; &verbar;d&verbar;)&period;

== Synopsis

Declared in `&lt;openssl&sol;bn&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BN&lowbar;nnmod(
    xref:BIGNUM.adoc[BIGNUM]* r,
    xref:BIGNUM.adoc[BIGNUM] const* m,
    xref:BIGNUM.adoc[BIGNUM] const* d,
    xref:BN_CTX.adoc[BN&lowbar;CTX]* ctx);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *r*
| Destination remainder&period;
| *m*
| Dividend&period;
| *d*
| Modulus (must be non&hyphen;zero)&period;
| *ctx*
| BN&lowbar;CTX scratch space&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
