Skip to content

Commit 733cb22

Browse files
committed
Add missing APIs&Macros to manpage
Signed-off-by: Steffen Jaeckel <[email protected]>
1 parent c166d76 commit 733cb22

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

doc/tommath.3

Lines changed: 47 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
@@ -471,6 +504,12 @@ Sets \fBret\fP to \fBtrue\fP if \fBarg\fP is a square, \fBfalse\fP otherwise.
471504
Returns \fBtrue\fP if \fBa = 0\fP, \fBfalse\fP otherwise.
472505
.in -1i
473506

507+
.LP
508+
.BI "bool mp_isone(mp_int *" a ")"
509+
.in 1i
510+
Returns \fBtrue\fP if \fBa = 1\fP, \fBfalse\fP otherwise.
511+
.in -1i
512+
474513
.LP
475514
.BI "mp_err mp_kronecker (const mp_int *" a ", const mp_int *" p ", int *" c ")"
476515
.in 1i
@@ -717,6 +756,14 @@ typedef enum {
717756
.in -1.5i
718757
.in -1i
719758

759+
.LP
760+
.BI "mp_err mp_prime_fermat(const mp_int *" a ", const mp_int *" b ", bool *" result ")"
761+
.in 1i
762+
Performs one Fermat test of \fBa\fP using base \fBb\fP.
763+
.br
764+
Sets \fBresult\fP to \fBtrue\fP if \fBa\fP is probably prime, \fBfalse\fP if composite.
765+
.in -1i
766+
720767
.LP
721768
.BI "mp_err mp_prime_strong_lucas_selfridge(const mp_int *" a ", bool *" result ")"
722769
.in 1i

0 commit comments

Comments
 (0)