diff options
author | est31 <MTest31@outlook.com> | 2015-08-06 08:57:13 +0200 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-11-08 15:57:15 -0500 |
commit | ad5ac39d8d1a8b8f6f0fe077e20bac914ddc624b (patch) | |
tree | 6d30b2687f6c0ed60c22e626be9c31ba64a8efd7 /doc | |
parent | d506d567075914b138ca869981f2e45ce503ee5d (diff) | |
download | minetest-ad5ac39d8d1a8b8f6f0fe077e20bac914ddc624b.tar.gz minetest-ad5ac39d8d1a8b8f6f0fe077e20bac914ddc624b.tar.bz2 minetest-ad5ac39d8d1a8b8f6f0fe077e20bac914ddc624b.zip |
Add LuaSecureRandom
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 63e4971e5..f82c3c2ac 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2765,6 +2765,15 @@ It can be created via `PcgRandom(seed)` or `PcgRandom(seed, sequence)`. * This is only a rough approximation of a normal distribution with mean=(max-min)/2 and variance=1 * Increasing num_trials improves accuracy of the approximation +### `SecureRandom` +Interface for the operating system's crypto-secure PRNG. + +It can be created via `SecureRandom()`. The constructor returns nil if a secure random device cannot be +be found on the system. + +#### Methods +* `next_bytes([count])`: return next `count` (default 1, capped at 2048) many random bytes, as a string. + ### `PerlinNoise` A perlin noise generator. It can be created via `PerlinNoise(seed, octaves, persistence, scale)` |