aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/doc/src
diff options
context:
space:
mode:
authorGuilherme Andrade <[email protected]>2017-03-18 17:27:35 +0000
committerGuilherme Andrade <[email protected]>2017-03-18 18:06:36 +0000
commit77039e648c8a62bfc4f0242531d5fd4874b29aad (patch)
tree3ed70566ce80b0feac00a0b36c2cb070c4e5a1b6 /lib/crypto/doc/src
parente50f63fbb2c974b4b8ad50095ca0b16a846fc161 (diff)
downloadotp-77039e648c8a62bfc4f0242531d5fd4874b29aad.tar.gz
otp-77039e648c8a62bfc4f0242531d5fd4874b29aad.tar.bz2
otp-77039e648c8a62bfc4f0242531d5fd4874b29aad.zip
Support cryptographically strong rand plugin
Diffstat (limited to 'lib/crypto/doc/src')
-rw-r--r--lib/crypto/doc/src/crypto.xml29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index dc725a41be..7a5bd62c26 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -767,6 +767,35 @@
</func>
<func>
+ <name>rand_seed() -> rand:state()</name>
+ <fsummary>Strong random number generation plugin state</fsummary>>
+ <desc>
+ Creates state object for <seealso marker="stdlib:rand">random number generation</seealso>,
+ in order to generate cryptographically strong random numbers
+ (based on OpenSSL's <c>BN_rand_range</c>),
+ and saves it on process dictionary before returning it as well.
+ See also <seealso marker="stdlib:rand#seed-1">rand:seed/1</seealso>
+
+ <p><em>Example</em></p>
+ <pre>
+crypto:rand_seed(),
+_IntegerValue = rand:uniform(42), % [1; 42]
+_FloatValue = rand:uniform(). % [0.0; 1.0]</pre>
+ </desc>
+ </func>
+
+ <func>
+ <name>rand_seed_s() -> rand:state()</name>
+ <fsummary>Strong random number generation plugin state</fsummary>>
+ <desc>
+ Creates state object for <seealso marker="stdlib:rand">random number generation</seealso>,
+ in order to generate cryptographically strongly random numbers
+ (based on OpenSSL's <c>BN_rand_range</c>).
+ See also <seealso marker="stdlib:rand#seed_s-1">rand:seed_s/1</seealso>
+ </desc>
+ </func>
+
+ <func>
<name>stream_init(Type, Key) -> State</name>
<fsummary></fsummary>
<type>