Use this module for data from crypto:strong_rand_bytes/1 while avoiding the high latency normally associated with crypto:strong_rand_bytes/1 usage. Data is cached to minimize the latency from each crypto:strong_rand_bytes/1 function call.
The cache_size option may be provided to either the init/1 function or the new/1 function to adjust the amount of data cached.Copyright © 2017-2023 Michael Truog
Version: 2.0.6 Oct 26 2023 11:37:41 ------------------------------------------------------------------------
Authors: Michael Truog (mjtruog at protonmail dot com).
Use this module for data from crypto:strong_rand_bytes/1 while avoiding the high latency normally associated with crypto:strong_rand_bytes/1 usage. Data is cached to minimize the latency from each crypto:strong_rand_bytes/1 function call.
The cache_size option may be provided to either the init/1 function or the new/1 function to adjust the amount of data cached. The cache_size value should vary based on the amount of random data consumed for a single function call and can be set based on higher-level system testing. If the cache_size option is not provided, the default set in the quickrand Erlang/OTP application env cache_size configuration parameter is used (64 KB is the default setting).options() = [{cache_size, Bytes::pos_integer()}]
state() = #quickrand_cache{i = non_neg_integer(), cache_size = pos_integer(), cache = binary()}
destroy() -> ok
float() -> float()
floatL() -> float()
floatM() -> float()
floatR() -> float()
init() -> ok
init(Options::options()) -> ok
new() -> state()
rand_bytes(N::pos_integer()) -> binary()
uniform(N::pos_integer()) -> pos_integer()
uniform_range(Min::integer(), Max::non_neg_integer()) -> integer()
Generated by EDoc