Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to use OTP24 and Rebar3 #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ebin/
.eunit/
_build/
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file removed rebar
Binary file not shown.
1 change: 1 addition & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[].
Binary file added rebar3
Binary file not shown.
6 changes: 3 additions & 3 deletions src/pbkdf2.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down
4 changes: 2 additions & 2 deletions tools.mk
Original file line number Diff line number Diff line change
@@ -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
Expand Down