diff options
| author | Paul Sokolovsky | 2016-01-17 12:10:28 +0200 |
|---|---|---|
| committer | Paul Sokolovsky | 2016-01-17 12:13:01 +0200 |
| commit | a58a91eb04c50daafb31228a79f6752374338c5e (patch) | |
| tree | 67c1aaf41dc3e52f650b2a9168a1e80c0f0e77f3 /stmhal | |
| parent | e7bee6b35ea4c9e622209902456be64559b94d17 (diff) | |
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 'stmhal')
| -rw-r--r-- | stmhal/mpconfigport.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h index c83d02b74..47ad0a415 100644 --- a/stmhal/mpconfigport.h +++ b/stmhal/mpconfigport.h @@ -79,6 +79,7 @@ #define MICROPY_PY_IO (1) #define MICROPY_PY_IO_FILEIO (1) #define MICROPY_PY_UBINASCII (1) +#define MICROPY_PY_URANDOM (1) #define MICROPY_PY_UCTYPES (1) #define MICROPY_PY_UZLIB (1) #define MICROPY_PY_UJSON (1) |
