ref: d8a1f1a647d396bda237df5e996b4d49a948eda9
parent: 07b245943ac5991b98ee4683f6c40efdf0fca351
author: glenda <[email protected]>
date: Thu Aug 27 09:34:02 EDT 2015
mp.h: define mpnrand
--- a/sys/include/mp.h
+++ b/sys/include/mp.h
@@ -38,6 +38,8 @@
/* 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 */