ExPBKDF2
Rust NIf for Password-Based Key Derivation Function v2 (PBKDF2). It uses the pbkdf2 rust library.
Installation
The package can be installed by adding ex_pbkdf2 to your list of dependencies in mix.exs:
def deps do
[
{:ex_pbkdf2, "~> 0.8.5"}
]
endUsage
EXPBKDF2 provides three functions:
generate_salt/1- generates salt that can be used inpbkdf2/2pbkdf2/2- hashes the provided passwordverify/3- verifies the hash
The docs can be found at https://hexdocs.pm/ex_pbkdf2.
Benchmarks
This NIF is 5 times faster than pbkdf2_elixir - 4.48 ms vs 22.89.ms. It also performs better in terms of used memory. Benchmarks can be found in the benchmarks directory
Contributing
- Fork it!
-
Create your feature branch (
git checkout -b my-new-feature) -
Commit your changes (
git commit -am 'Add some feature') -
Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Author
Ayrat Badykov (@ayrat555)