pbkdf2_key_derivation v1.0.1 Pbkdf2KeyDerivation View Source

Link to this section Summary

Functions

Derives a key of length key_bytes for pass, using algo and salt for count iterations.

Link to this section Functions

Link to this function

pbkdf2(algo, pass, salt, count, key_bytes)

View Source

Derives a key of length key_bytes for pass, using algo and salt for count iterations.

algo can be one of :sha | :sha256 | :sha512

Example

iex> Pbkdf2KeyDerivation.pbkdf2(:sha512, "password", "salt", 1000, 64) |> Base.encode16
"AFE6C5530785B6CC6B1C6453384731BD5EE432EE549FD42FB6695779AD8A1C5BF59DE69C48F774EFC4007D5298F9033C0241D5AB69305E7B64ECEEB8D834CFEC"