diff options
author | Ingela Anderton Andin <[email protected]> | 2016-04-15 10:29:31 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-04-25 11:25:04 +0200 |
commit | 1ad18832cb21fac5a5b513005f1e6a5ffd7d0329 (patch) | |
tree | 3080a7756eae9f5ff2c95311dd3fd7b05ee21de2 /lib/crypto/doc | |
parent | 79f3e0ef07eff9d22fb1735d77813142da493bfc (diff) | |
download | otp-1ad18832cb21fac5a5b513005f1e6a5ffd7d0329.tar.gz otp-1ad18832cb21fac5a5b513005f1e6a5ffd7d0329.tar.bz2 otp-1ad18832cb21fac5a5b513005f1e6a5ffd7d0329.zip |
crypto: Deprecate rand_bytes/1
OpenSSL has deprecated the function RAND_pseudo_bytes used by
crypto:rand_bytes/1, so this function is now deprecated in OTP too.
rand_bytes/3 also used this function, but was not documented
so we can remove it right away.
This commit also removes the fallback in generate_key to use
rand_bytes/1 if strong_rand_bytes/1 throws low entropy.
This is a potential incompatibility but we think it is desirable
as crypto should provide cryptographically secure functions.
Diffstat (limited to 'lib/crypto/doc')
-rw-r--r-- | lib/crypto/doc/src/crypto.xml | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index e0b989436f..5a5627747c 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -308,6 +308,8 @@ <desc> <p>Generates public keys of type <c>Type</c>. See also <seealso marker="public_key:public_key#generate_key-1">public_key:generate_key/1</seealso> + May throw exception <c>low_entropy</c> in case the random generator + failed due to lack of secure "randomness". </p> </desc> </func> @@ -596,22 +598,6 @@ </func> <func> - <name>rand_bytes(N) -> binary()</name> - <fsummary>Generate a binary of random bytes</fsummary> - <type> - <v>N = integer()</v> - </type> - <desc> - <p>Generates N bytes randomly uniform 0..255, and returns the - result in a binary. Uses the <c>crypto</c> library pseudo-random - number generator.</p> - <p>This function is not recommended for cryptographic purposes. - Please use <seealso marker="#strong_rand_bytes/1"> - strong_rand_bytes/1</seealso> instead.</p> - </desc> - </func> - - <func> <name>rand_seed(Seed) -> ok</name> <fsummary>Set the seed for random bytes generation</fsummary> <type> |