massivefermion / erl_argon2

nifs for hashing and verifying passwords using argon2
https://hex.pm/packages/argon2
Apache License 2.0
0 stars 0 forks source link
argon2 argon2i argon2id crypto cryptography elixir erlang hash hashing nif password password-hash password-hashing rust

argon2

nifs for hashing and verifying passwords using argon2

Build

$ rebar3 compile

Usage

{ok, Hash} = argon2:hash(<<"password">>).
{ok, Matched} = argon2:verify(<<"password">>, Hash).

{ok, Hash} = argon2:hash(<<"password">>, argon2d).
{ok, Matched} = argon2:verify(<<"password">>, Hash).

{ok, Hash} = argon2:hash_with_secret(<<"password">>, <<"secret">>).
{ok, Matched} = argon2:verify_with_secret(<<"password">>, Hash, <<"secret">>).

{ok, Hash} = argon2:hash_with_secret(<<"password">>, argon2i, <<"secret">>).
{ok, Matched} = argon2:verify_with_secret(<<"password">>, Hash, <<"secret">>).