From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 30 Jun 2017 17:04:07 +0300
Subject: [PATCH] Deprecated funs
crypto:rand_bytes/1 -> crypto:strong_rand_bytes/1
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/src/riak_dt_gcounter.erl b/src/riak_dt_gcounter.erl
index 8f2f24a..0877167 100644
--- a/src/riak_dt_gcounter.erl
+++ b/src/riak_dt_gcounter.erl
@@ -278,7 +278,7 @@ roundtrip_bin_test() ->
lots_of_actors_test() ->
GC = lists:foldl(fun(_, GCnt) ->
ActorLen = crypto:rand_uniform(1, 1000),
- Actor = crypto:rand_bytes(ActorLen),
+ Actor = crypto:strong_rand_bytes(ActorLen),
Cnt = crypto:rand_uniform(1, 10000),
{ok, Cnt2} =riak_dt_gcounter:update({increment, Cnt}, Actor, GCnt),
Cnt2
diff --git a/src/riak_dt_map.erl b/src/riak_dt_map.erl
index 7b1ec5b..8f5d683 100644
--- a/src/riak_dt_map.erl
+++ b/src/riak_dt_map.erl
@@ -957,10 +957,10 @@ equals_test() ->
unsupported_version_test() ->
?assertMatch(?UNSUPPORTED_VERSION(12), to_binary(12, new())),
- ?assertMatch(?UNSUPPORTED_VERSION(8) , from_binary(<<?TAG:8/integer, 8:8/integer, (crypto:rand_bytes(22))/binary>>)).
+ ?assertMatch(?UNSUPPORTED_VERSION(8) , from_binary(<<?TAG:8/integer, 8:8/integer, (crypto:strong_rand_bytes(22))/binary>>)).
invalid_binary_test() ->
- ?assertMatch(?INVALID_BINARY, from_binary(<<(crypto:rand_bytes(187))/binary>>)).
+ ?assertMatch(?INVALID_BINARY, from_binary(<<(crypto:strong_rand_bytes(187))/binary>>)).
-ifdef(EQC).
-define(NUMTESTS, 1000).