diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-01-17 12:10:28 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-01-17 12:13:01 +0200 |
commit | a58a91eb04c50daafb31228a79f6752374338c5e (patch) | |
tree | 67c1aaf41dc3e52f650b2a9168a1e80c0f0e77f3 /unix | |
parent | e7bee6b35ea4c9e622209902456be64559b94d17 (diff) | |
download | micropython-a58a91eb04c50daafb31228a79f6752374338c5e.tar.gz micropython-a58a91eb04c50daafb31228a79f6752374338c5e.zip |
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
Diffstat (limited to 'unix')
-rw-r--r-- | unix/mpconfigport.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 0eaa84d15c..2f992fdf03 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -104,6 +104,7 @@ #define MICROPY_PY_UHEAPQ (1) #define MICROPY_PY_UHASHLIB (1) #define MICROPY_PY_UBINASCII (1) +#define MICROPY_PY_URANDOM (1) #ifndef MICROPY_PY_USELECT #define MICROPY_PY_USELECT (1) #endif |