diff --git a/.gitignore b/.gitignore index a18c1c1d391..2a8f80d9f5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ ebin/ .eunit/ +_build/ \ No newline at end of file diff --git a/Makefile b/Makefile index 7a04321d7e6..58216ec4bf7 100644 --- a/Makefile +++ b/Makefile @@ -3,16 +3,16 @@ all: deps compile compile: deps - ./rebar compile + ./rebar3 compile deps: - test -d deps || ./rebar get-deps + test -d deps || ./rebar3 get-deps clean: - ./rebar clean + ./rebar3 clean distclean: clean - ./rebar delete-deps + ./rebar3 delete-deps DIALYZER_APPS = kernel stdlib erts sasl ssl crypto public_key diff --git a/README.md b/README.md index 472dc4c947d..192f5f25013 100644 --- a/README.md +++ b/README.md @@ -11,17 +11,17 @@ A [PBKDF2][] implementation for [Erlang][] extracted from [Apache CouchDB][]. Building -------- -`erlang-pbkdf2` uses [rebar][] to manage the build process. To build the project, run: +`erlang-pbkdf2` uses [rebar3][] to manage the build process. To build the project, run: - ./rebar compile + ./rebar3 compile You can then run the `xref` and `eunit` tests: - ./rebar xref eunit + ./rebar3 xref eunit If you want to remove all generated files, run: - ./rebar clean + ./rebar3 clean [rebar]: https://github.com/rebar/rebar/wiki diff --git a/rebar b/rebar deleted file mode 100755 index 327a40148bf..00000000000 Binary files a/rebar and /dev/null differ diff --git a/rebar.lock b/rebar.lock new file mode 100644 index 00000000000..57afcca0459 --- /dev/null +++ b/rebar.lock @@ -0,0 +1 @@ +[]. diff --git a/rebar3 b/rebar3 new file mode 100755 index 00000000000..9bb538c0b9d Binary files /dev/null and b/rebar3 differ diff --git a/src/pbkdf2.erl b/src/pbkdf2.erl index dcc66064013..1cc3e2c5aa1 100644 --- a/src/pbkdf2.erl +++ b/src/pbkdf2.erl @@ -137,9 +137,9 @@ pbkdf2(MacFunc, Password, Salt, Iterations, BlockIndex, Iteration, Prev, Acc) -> resolve_mac_func({hmac, DigestFunc}) -> fun(Key, Data) -> %crypto:hmac(DigestFunc, Key, Data) - HMAC = crypto:hmac_init(DigestFunc, Key), - HMAC1 = crypto:hmac_update(HMAC, Data), - crypto:hmac_final(HMAC1) + HMAC = crypto:mac_init(hmac, DigestFunc, Key), + HMAC1 = crypto:mac_update(HMAC, Data), + crypto:mac_final(HMAC1) end; resolve_mac_func(MacFunc) when is_function(MacFunc) -> diff --git a/tools.mk b/tools.mk index 82a0669b19a..9f7d1ffcfd1 100644 --- a/tools.mk +++ b/tools.mk @@ -1,8 +1,8 @@ test: compile - ./rebar eunit skip_deps=true + ./rebar3 eunit skip_deps=true docs: - ./rebar doc skip_deps=true + ./rebar3 doc skip_deps=true PLT ?= $(HOME)/.riak_combo_dialyzer_plt LOCAL_PLT = .local_dialyzer_plt