summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorglenda <glenda@cirno.localdomain>2015-08-27 13:34:02 +0000
committerglenda <glenda@cirno.localdomain>2015-08-27 13:34:02 +0000
commitd8a1f1a647d396bda237df5e996b4d49a948eda9 (patch)
tree29da1f600a6ac6114510abbcc8ce1cabbce4ac37 /sys/include
parent07b245943ac5991b98ee4683f6c40efdf0fca351 (diff)
mp.h: define mpnrand
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/mp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/include/mp.h b/sys/include/mp.h
index c7179c959..04ef6a7b5 100644
--- a/sys/include/mp.h
+++ b/sys/include/mp.h
@@ -38,6 +38,8 @@ void mpassign(mpint *old, mpint *new);
/* random bits */
mpint* mprand(int bits, void (*gen)(uchar*, int), mpint *b);
+/* return uniform random [0..n-1] */
+mmpint* mpnrand(mpint *n, void (*gen)(uchar*, int), mpint *b)
/* conversion */
mpint* strtomp(char*, char**, int, mpint*); /* ascii */