Skip to content

Commit eb7e17c

Browse files
committed
Add missing APIs&Macros to manpage
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent b4501d2 commit eb7e17c

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

doc/tommath.3

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,24 @@ Frees the heap memory of \fBa\fP.
7979
Returns the position of the lowest bit set.
8080
.in -1i
8181

82+
.LP
83+
.BI "mp_ord mp_cmp(const mp_int *" a ", const mp_int *" b ")"
84+
.in 1i
85+
Compare \fBa\fP to \fBb\fP.
86+
.in -1i
87+
88+
.LP
89+
.BI "mp_ord mp_cmp_d(const mp_int *" a ", mp_digit " b ")"
90+
.in 1i
91+
Compare \fBa\fP to a single digit \fBb\fP.
92+
.in -1i
93+
94+
.LP
95+
.BI "mp_ord mp_cmp_mag(const mp_int *" a ", const mp_int *" b ")"
96+
.in 1i
97+
Compares the absolute values of \fBa\fP and \fBb\fP.
98+
.in -1i
99+
82100
.LP
83101
.BI "mp_err mp_complement(const mp_int *" a ", mp_int *" b ")"
84102
.in 1i
@@ -279,6 +297,7 @@ mp_get_i64;5543444065158278130
279297
mp_get_mag_u32;3221335026
280298
mp_get_mag_u64;5543444065158278130
281299
mp_get_l;5543444065158278130
300+
mp_get_ul;5543444065158278130
282301
mp_get_mag_ul;5543444065158278130
283302
.TE
284303
.in -1i
@@ -315,6 +334,14 @@ Returns an unsigned 64 bit integer from big-integer \fBa\fP.
315334
\fBNOTE:\fP This function is truncating. See \fBmp_get_i32\fP for details.
316335
.in -1i
317336

337+
.LP
338+
.BI "unsigned long mp_get_mag_ul (const mp_int *" a ")"
339+
.in 1i
340+
Returns an unsigned long from big-integer \fBa\fP.
341+
.br
342+
\fBNOTE:\fP This function is truncating. See \fBmp_get_i32\fP for details.
343+
.in -1i
344+
318345
.LP
319346
.BI "uint32_t mp_get_u32 (const mp_int *" a ")"
320347
.in 1i
@@ -327,6 +354,12 @@ Convenience macro for \fBmp_get_mag_u32()\fP.
327354
Convenience macro for \fBmp_get_mag_u64()\fP.
328355
.in -1i
329356

357+
.LP
358+
.BI "unsigned long mp_get_ul (const mp_int *" a ")"
359+
.in 1i
360+
Convenience macro for \fBmp_get_mag_ul()\fP.
361+
.in -1i
362+
330363
.LP
331364
.BI "mp_err mp_grow (mp_int *" a ", int " size ")"
332365
.in 1i
@@ -717,6 +750,14 @@ typedef enum {
717750
.in -1.5i
718751
.in -1i
719752

753+
.LP
754+
.BI "mp_err mp_prime_fermat(const mp_int *" a ", const mp_int *" b ", bool *" result ")"
755+
.in 1i
756+
Performs one Fermat test of \fBa\fP using base \fBb\fP.
757+
.br
758+
Sets \fBresult\fP to \fBtrue\fP if \fBa\fP is probably prime, \fBfalse\fP if composite.
759+
.in -1i
760+
720761
.LP
721762
.BI "mp_err mp_prime_strong_lucas_selfridge(const mp_int *" a ", bool *" result ")"
722763
.in 1i

0 commit comments

Comments
 (0)