From cdbe44920678d68a9936e1ab504bc1c8aad65847 Mon Sep 17 00:00:00 2001
From: David Whitlock Generates N bytes randomly uniform 0..255, and returns the
- result in a binary. Uses the
This function is not recommended for cryptographic purposes.
+ Please use
%% First three parameters depending on which crypto type we select:
Key = <<"This is a 256 bit key. abcdefghi">>,
-Ivec0 = crypto:rand_bytes(16),
+Ivec0 = crypto:strong_rand_bytes(16),
DataSize = 1024, % DataSize rem 16 = 0 for aes_cbc
%% Initialization of the CryptoState, in this case it is the Ivector.
diff --git a/lib/stdlib/doc/src/rand.xml b/lib/stdlib/doc/src/rand.xml
index e7d4728ef7..50057259c6 100644
--- a/lib/stdlib/doc/src/rand.xml
+++ b/lib/stdlib/doc/src/rand.xml
@@ -104,7 +104,7 @@
strong. If a strong cryptographic random number generator is
needed, use one of functions in the
crypto
- module, for example crypto:rand_bytes/1 .
+ module, for example crypto:strong_rand_bytes/1 .
diff --git a/lib/stdlib/doc/src/random.xml b/lib/stdlib/doc/src/random.xml
index 91a4012ce9..f6f9e56966 100644
--- a/lib/stdlib/doc/src/random.xml
+++ b/lib/stdlib/doc/src/random.xml
@@ -48,7 +48,7 @@
tuple of three integers.
It should be noted that this random number generator is not cryptographically
strong. If a strong cryptographic random number generator is needed for
- example crypto:rand_bytes/1 could be used instead.
+ example crypto:strong_rand_bytes/1 could be used instead.
The new and improved rand module should be used
instead of this module.
--
cgit v1.2.3