aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2017-04-21 11:47:07 +0200
committerRaimo Niskanen <[email protected]>2017-04-21 11:47:07 +0200
commit621cedccc78581330b9628c559b0d851c303564f (patch)
treea77de6e999a63ca0dfaa299568f2468847f7d7a0 /lib/crypto
parent4f67e66b82c6a5c4f0b1fd7932e7e57f86dd202f (diff)
parent437555fd6c495915773b0f9ade7aad3fd0a73a1b (diff)
downloadotp-621cedccc78581330b9628c559b0d851c303564f.tar.gz
otp-621cedccc78581330b9628c559b0d851c303564f.tar.bz2
otp-621cedccc78581330b9628c559b0d851c303564f.zip
Merge branch 'raimo/rand-dev/OTP-14295'
* raimo/rand-dev/OTP-14295: Implement Xoroshiro116+ and improve statisticals
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/src/crypto.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 1287ec6176..765998b85d 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -35,7 +35,6 @@
-export([rand_plugin_next/1]).
-export([rand_plugin_uniform/1]).
-export([rand_plugin_uniform/2]).
--export([rand_plugin_jump/1]).
-export([rand_uniform/2]).
-export([block_encrypt/3, block_decrypt/3, block_encrypt/4, block_decrypt/4]).
-export([next_iv/2, next_iv/3]).
@@ -316,11 +315,10 @@ rand_seed() ->
rand_seed_s() ->
{#{ type => ?MODULE,
- max => infinity,
+ bits => 64,
next => fun ?MODULE:rand_plugin_next/1,
uniform => fun ?MODULE:rand_plugin_uniform/1,
- uniform_n => fun ?MODULE:rand_plugin_uniform/2,
- jump => fun ?MODULE:rand_plugin_jump/1},
+ uniform_n => fun ?MODULE:rand_plugin_uniform/2},
no_seed}.
rand_plugin_next(Seed) ->
@@ -332,8 +330,6 @@ rand_plugin_uniform(State) ->
rand_plugin_uniform(Max, State) ->
{bytes_to_integer(strong_rand_range(Max)) + 1, State}.
-rand_plugin_jump(State) ->
- State.
strong_rand_range(Range) when is_integer(Range), Range > 0 ->
BinRange = int_to_bin(Range),