extmod/modurandom: Add "urandom" module.
Seedable and reproducible pseudo-random number generator. Implemented functions are getrandbits(n) (n <= 32) and seed(). The algorithm used is Yasmarang by Ilya Levin: http://www.literatecode.com/yasmarang
This commit is contained in:
@@ -671,3 +671,9 @@ Q(count)
|
||||
#if MICROPY_PY_OS_DUPTERM
|
||||
Q(dupterm)
|
||||
#endif
|
||||
|
||||
#if MICROPY_PY_URANDOM
|
||||
Q(urandom)
|
||||
Q(getrandbits)
|
||||
Q(seed)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user