diff --git a/.circleci/config.yml b/.circleci/config.yml index 851d864..cf25739 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 executors: aebuilder: docker: - - image: aeternity/builder + - image: aeternity/builder:bionic-otp23 user: builder working_directory: ~/src diff --git a/rebar.config b/rebar.config index 1040222..030bc75 100644 --- a/rebar.config +++ b/rebar.config @@ -5,7 +5,7 @@ {plugins, [rebar3_hex]}. {profiles, [{test, [{deps, [{jsx, {git, "https://github.com/talentdeficit/jsx.git", {tag, "2.8.0"}}}, - {enacl, "0.17.2"}]}]} + {enacl, {git, "https://github.com/aeternity/enacl.git", {ref, "a3d010b"}}}]}]} ]}. {xref_checks, [undefined_function_calls, undefined_functions, diff --git a/test/eblake2_tests.erl b/test/eblake2_tests.erl index aabf3c7..4664c2f 100644 --- a/test/eblake2_tests.erl +++ b/test/eblake2_tests.erl @@ -28,14 +28,14 @@ benchmark_test() -> %% Benchmark Blake2b against enacl. #{in := In, key := <<>>, out := Exp} = hd(filter_test_vectors(<<"blake2b">>)), HashLen = byte_size(Exp), - {T1, _} = timer:tc(fun() -> [ {ok, Exp} = enacl:generichash(HashLen, In) || _ <- lists:seq(1, 500) ] end), + {T1, _} = timer:tc(fun() -> [ Exp = enacl:generichash(HashLen, In) || _ <- lists:seq(1, 500) ] end), {T2, _} = timer:tc(fun() -> [ {ok, Exp} = eblake2:blake2b(HashLen, In) || _ <- lists:seq(1, 500) ] end), ?debugFmt("~.2f ms compared to ~.2f ms\n", [T1 / 1000, T2 / 1000]), BigData = <<0:(1024*10)>>, - {T3, _} = timer:tc(fun() -> [ {ok, _} = enacl:generichash(HashLen, BigData) || _ <- lists:seq(1, 50) ] end), + {T3, _} = timer:tc(fun() -> [ enacl:generichash(HashLen, BigData) || _ <- lists:seq(1, 50) ] end), {T4, _} = timer:tc(fun() -> [ {ok, _} = eblake2:blake2b(HashLen, BigData) || _ <- lists:seq(1, 50) ] end), ?debugFmt("~.2f ms compared to ~.2f ms\n", [T3 / 1000, T4 / 1000]), @@ -49,7 +49,7 @@ random_test_() -> random_test(I) -> Data = crypto:strong_rand_bytes(I * 50), - {ok, Enacl} = enacl:generichash(64, Data), + Enacl = enacl:generichash(64, Data), {ok, Eblake} = eblake2:blake2b(64, Data), ?assertEqual(Eblake, Enacl).