diff options
author | Guilherme Andrade <[email protected]> | 2017-03-18 17:32:23 +0000 |
---|---|---|
committer | Guilherme Andrade <[email protected]> | 2017-03-18 18:06:37 +0000 |
commit | 5eae0dacf40ec60b09f0fdf761987e39320c4db0 (patch) | |
tree | c76f69da65b7932b25d0f669a90bc037f4a60250 /lib/crypto/test | |
parent | 77039e648c8a62bfc4f0242531d5fd4874b29aad (diff) | |
download | otp-5eae0dacf40ec60b09f0fdf761987e39320c4db0.tar.gz otp-5eae0dacf40ec60b09f0fdf761987e39320c4db0.tar.bz2 otp-5eae0dacf40ec60b09f0fdf761987e39320c4db0.zip |
No longer expose strong_rand_(range|float)
Diffstat (limited to 'lib/crypto/test')
-rw-r--r-- | lib/crypto/test/crypto_SUITE.erl | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 482a07d634..1b7456af18 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -37,8 +37,6 @@ all() -> mod_pow, exor, rand_uniform, - strong_rand_range, - strong_rand_float, rand_plugin, rand_plugin_s ]. @@ -490,44 +488,6 @@ rand_uniform(Config) when is_list(Config) -> 10 = byte_size(crypto:strong_rand_bytes(10)). %%-------------------------------------------------------------------- -strong_rand_range() -> - [{doc, "strong_rand_range testing"}]. -strong_rand_range(Config) when is_list(Config) -> - MaxCeiling = 1 bsl 32, - Ceilings = [1 | % edge case where only 0 can be generated - [binary:decode_unsigned(crypto:strong_rand_range(MaxCeiling), big) - || _ <- lists:seq(1, 99)]], - - allmap( - fun (Ceiling) -> - case Ceiling >= 0 andalso Ceiling < MaxCeiling of - false -> - {false, ct:fail({"Ceiling not in interval", Ceiling, 0, MaxCeiling})}; - true -> - Samples = [binary:decode_unsigned(crypto:strong_rand_range(Ceiling), big) - || _ <- lists:seq(1, 100)], - allmap( - fun (V) -> - (V >= 0 andalso V < Ceiling) - orelse {false, ct:fail({"Sample not in interval", V, 0, Ceiling})} - end, - Samples) - end - end, - Ceilings). - -strong_rand_float() -> - [{doc, "strong_rand_float testing"}]. -strong_rand_float(Config) when is_list(Config) -> - Samples = [crypto:strong_rand_float() || _ <- lists:seq(1, 10000)], - allmap( - fun (V) -> - (V >= 0.0 andalso V < 1.0) - orelse {false, ct:fail({"Not in interval", V, 0.0, 1.0})} - end, - Samples). - -%%-------------------------------------------------------------------- rand_plugin() -> [{doc, "crypto rand plugin testing (implicit state / process dictionary)"}]. rand_plugin(Config) when is_list(Config) -> |