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/test/old_crypto_SUITE.erl | |
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/test/old_crypto_SUITE.erl')
-rw-r--r-- | lib/crypto/test/old_crypto_SUITE.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/crypto/test/old_crypto_SUITE.erl b/lib/crypto/test/old_crypto_SUITE.erl index f57e9ff341..0d97290d10 100644 --- a/lib/crypto/test/old_crypto_SUITE.erl +++ b/lib/crypto/test/old_crypto_SUITE.erl @@ -2068,8 +2068,8 @@ exor_test(Config) when is_list(Config) -> B = <<1, 2, 3, 4, 5, 6, 7, 8, 9, 10>>, Z1 = zero_bin(B), Z1 = crypto:exor(B, B), - B1 = crypto:rand_bytes(100), - B2 = crypto:rand_bytes(100), + B1 = crypto:strong_rand_bytes(100), + B2 = crypto:strong_rand_bytes(100), Z2 = zero_bin(B1), Z2 = crypto:exor(B1, B1), Z2 = crypto:exor(B2, B2), |