From 77039e648c8a62bfc4f0242531d5fd4874b29aad Mon Sep 17 00:00:00 2001
From: Guilherme Andrade
Date: Sat, 18 Mar 2017 17:27:35 +0000
Subject: Support cryptographically strong rand plugin
---
lib/stdlib/doc/src/rand.xml | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
(limited to 'lib/stdlib/doc')
diff --git a/lib/stdlib/doc/src/rand.xml b/lib/stdlib/doc/src/rand.xml
index 8745e16908..e7a5fb7fab 100644
--- a/lib/stdlib/doc/src/rand.xml
+++ b/lib/stdlib/doc/src/rand.xml
@@ -120,19 +120,27 @@ S0 = rand:seed_s(exsplus),
{SND0, S2} = rand:normal_s(S1),
- This random number generator is not cryptographically
- strong. If a strong cryptographic random number generator is
- needed, use one of functions in the
- crypto
- module, for example,
- crypto:strong_rand_bytes/1.
+ The builtin random number generator algorithms are not
+ cryptographically strong. If a cryptographically strong
+ random number generator is needed, use something like
+ crypto:rand_seed/0.
+
+
+
+
+
+
+
+
+
+
Algorithm-dependent state.
@@ -216,7 +224,7 @@ S0 = rand:seed_s(exsplus),
Seeds random number generation with the specifed algorithm and
- time-dependent data if AlgOrExpState is an algorithm.
+ time-dependent data if AlgOrStateOrExpState is an algorithm.
Otherwise recreates the exported seed in the process dictionary,
and returns the state. See also
export_seed/0.
@@ -237,7 +245,7 @@ S0 = rand:seed_s(exsplus),
Seed random number generator.
Seeds random number generation with the specifed algorithm and
- time-dependent data if AlgOrExpState is an algorithm.
+ time-dependent data if AlgOrStateOrExpState is an algorithm.
Otherwise recreates the exported seed and returns the state.
See also
export_seed/0.
--
cgit v1.2.3
From e1a74e3077ca870520a748f29dd7c4b9115ce090 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen
Date: Mon, 3 Apr 2017 12:29:23 +0200
Subject: Clean up documentation and test cases
---
lib/stdlib/doc/src/rand.xml | 43 ++++++++++++++++++++++++++++++++-----------
1 file changed, 32 insertions(+), 11 deletions(-)
(limited to 'lib/stdlib/doc')
diff --git a/lib/stdlib/doc/src/rand.xml b/lib/stdlib/doc/src/rand.xml
index e7a5fb7fab..2ddf3021ac 100644
--- a/lib/stdlib/doc/src/rand.xml
+++ b/lib/stdlib/doc/src/rand.xml
@@ -139,7 +139,19 @@ S0 = rand:seed_s(exsplus),
-
+
+
+
+
+ Algorithm specific internal state
+
+
+
+ Algorithm specific internal state
+
+
+
+ Algorithm specific internal state
@@ -147,8 +159,11 @@ S0 = rand:seed_s(exsplus),
- Algorithm-dependent state that can be printed or saved to
- file.
+
+
+ Algorithm-dependent state that can be printed or saved to file.
+
+
@@ -223,8 +238,11 @@ S0 = rand:seed_s(exsplus),
Seed random number generator.
- Seeds random number generation with the specifed algorithm and
- time-dependent data if AlgOrStateOrExpState is an algorithm.
+
+ Seeds random number generation with the specifed algorithm and
+ time-dependent data if AlgOrStateOrExpState
+ is an algorithm.
+
Otherwise recreates the exported seed in the process dictionary,
and returns the state. See also
export_seed/0.
@@ -244,8 +262,11 @@ S0 = rand:seed_s(exsplus),
Seed random number generator.
- Seeds random number generation with the specifed algorithm and
- time-dependent data if AlgOrStateOrExpState is an algorithm.
+
+ Seeds random number generation with the specifed algorithm and
+ time-dependent data if AlgOrStateOrExpState
+ is an algorithm.
+
Otherwise recreates the exported seed and returns the state.
See also
export_seed/0.
@@ -266,7 +287,7 @@ S0 = rand:seed_s(exsplus),
Return a random float.
Returns a random float uniformly distributed in the value
- range 0.0 < X < 1.0 and
+ range 0.0 =< X < 1.0 and
updates the state in the process dictionary.
@@ -277,7 +298,7 @@ S0 = rand:seed_s(exsplus),
Returns, for a specified integer N >= 1,
a random integer uniformly distributed in the value range
- 1 <= X <= N and
+ 1 =< X =< N and
updates the state in the process dictionary.
@@ -287,7 +308,7 @@ S0 = rand:seed_s(exsplus),
Return a random float.
Returns, for a specified state, random float
- uniformly distributed in the value range 0.0 <
+ uniformly distributed in the value range 0.0 =<
X < 1.0 and a new state.
@@ -298,7 +319,7 @@ S0 = rand:seed_s(exsplus),
Returns, for a specified integer N >= 1
and a state, a random integer uniformly distributed in the value
- range 1 <= X <= N and a
+ range 1 =< X =< N and a
new state.
--
cgit v1.2.3