aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/doc/src/crypto.xml
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-02-13 18:14:10 +0100
committerLukas Larsson <[email protected]>2014-02-24 15:16:06 +0100
commitd58602adef3412b354fd521bbd4bda24a0b1a789 (patch)
treef77e5139df373983c15e2eca62943ba6bde927f1 /lib/crypto/doc/src/crypto.xml
parent3b0eb33f899f361d5006824782e1ef1d16f57e5c (diff)
downloadotp-d58602adef3412b354fd521bbd4bda24a0b1a789.tar.gz
otp-d58602adef3412b354fd521bbd4bda24a0b1a789.tar.bz2
otp-d58602adef3412b354fd521bbd4bda24a0b1a789.zip
crypto: Add rand_seed function
This function is needed on OSs that do not automatically initialize the PRNG seed.
Diffstat (limited to 'lib/crypto/doc/src/crypto.xml')
-rw-r--r--lib/crypto/doc/src/crypto.xml15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index 40f829e704..952808d9db 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -552,6 +552,21 @@
</desc>
</func>
+ <func>
+ <name>rand_seed(Seed) -> ok</name>
+ <fsummary>Set the seed for random bytes generation</fsummary>
+ <type>
+ <v>Seed = binary()</v>
+ </type>
+ <desc>
+ <p>Set the seed for PRNG to the given binary. This calls the
+ RAND_seed function from openssl. Only use this if the system
+ you are running on does not have enough "randomness" built in.
+ Normally this is when <seealso marker="#strong_rand_bytes/1">
+ stong_rand_bytes/1</seealso> returns <c>low_entropy</c></p>
+ </desc>
+ </func>
+
<func>
<name>rand_uniform(Lo, Hi) -> N</name>
<fsummary>Generate a random number</fsummary>