From d8a1f1a647d396bda237df5e996b4d49a948eda9 Mon Sep 17 00:00:00 2001 From: glenda Date: Thu, 27 Aug 2015 13:34:02 +0000 Subject: mp.h: define mpnrand --- sys/include/mp.h | 2 ++ 1 file changed, 2 insertions(+) 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 */ -- cgit v1.2.3