aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/src/crypto.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-03-20 15:41:06 +0100
committerIngela Anderton Andin <[email protected]>2017-03-20 15:41:06 +0100
commit4e44a1414bcdae81305f98d7789fdad00a0bc94d (patch)
tree984a9dde5e547f78dd03ce37a587847691d2e2ed /lib/crypto/src/crypto.erl
parent6a0ca45bb465150ba47d057ecd6c75681b790aab (diff)
downloadotp-4e44a1414bcdae81305f98d7789fdad00a0bc94d.tar.gz
otp-4e44a1414bcdae81305f98d7789fdad00a0bc94d.tar.bz2
otp-4e44a1414bcdae81305f98d7789fdad00a0bc94d.zip
crypto: Deprecate crypto:rand_uniform/2 as it is not cryptographically strong
rand module should be used if not cryptographically strong is required. If cryptographically strong is required, new cryptographically strong functions should be added to crypto.
Diffstat (limited to 'lib/crypto/src/crypto.erl')
-rw-r--r--lib/crypto/src/crypto.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 631af62615..ce8add6559 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -40,6 +40,8 @@
-export([ec_curve/1, ec_curves/0]).
-export([rand_seed/1]).
+-deprecated({rand_uniform, 2, next_major_release}).
+
%% This should correspond to the similar macro in crypto.c
-define(MAX_BYTES_TO_NIF, 20000). %% Current value is: erlang:system_info(context_reductions) * 10