From e50f63fbb2c974b4b8ad50095ca0b16a846fc161 Mon Sep 17 00:00:00 2001
From: Guilherme Andrade
Date: Sat, 18 Mar 2017 12:57:19 +0000
Subject: Restyle crypto strong numeric generators for usage in rand
---
lib/crypto/doc/src/crypto.xml | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
(limited to 'lib/crypto/doc/src')
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index 0697f6a202..dc725a41be 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -662,8 +662,8 @@
you are running on does not have enough "randomness" built in.
Normally this is when either
strong_rand_bytes/1,
- strong_rand_uniform/0 or
- strong_rand_uniform/1
+ strong_rand_range/1 or
+ strong_rand_float/0
throws low_entropy
@@ -733,36 +733,36 @@
- strong_rand_uniform() -> X
- Generate a random floating point number between 0.0 and 1.0
+ strong_rand_range(N) -> binary()
+ Generate a random non-negative integer between 0 and N
- X = float()
+ N = pos_integer() | binary()
- Generates a random floating pointer number uniformly distributed
- in the value range
+
Generates a random non-negative integer uniformly distributed
+ in the value range
Uses a cryptographically secure prng seeded and periodically mixed with operating system
provided entropy. By default this is the BN_rand_range method from OpenSSL.
+ Returns binary representation.
May throw exception low_entropy in case the random generator
failed due to lack of secure "randomness".
- The generated values shall present no more than 51 bits of effective entropy.
- strong_rand_uniform(N) -> X
- Generate a random positive integer between 1 and N
+ strong_rand_float() -> X
+ Generate a random floating point number between 0.0 and 1.0
- N = pos_integer()
- X = 1..N
+ X = float()
- Generates a a random positive integer uniformly distributed
- in the value range
+
Generates a random floating pointer number uniformly distributed
+ in the value range
Uses a cryptographically secure prng seeded and periodically mixed with operating system
provided entropy. By default this is the BN_rand_range method from OpenSSL.
May throw exception low_entropy in case the random generator
failed due to lack of secure "randomness".
+ The generated values shall present no more than 51 bits of effective entropy.
--
cgit v1.2.3