From ad5ac39d8d1a8b8f6f0fe077e20bac914ddc624b Mon Sep 17 00:00:00 2001 From: est31 Date: Thu, 6 Aug 2015 08:57:13 +0200 Subject: Add LuaSecureRandom --- doc/lua_api.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/lua_api.txt') 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)` -- cgit v1.2.3