Evp

Partial implementation of OpenSSl EVP_BytesToKey

Usage

Call Evp.bytes_to_key/1 with a password or Evp.bytes_to_key/1 with password and salt (8 bytes in size) to get a key and iv.

{:ok, %{key: key, iv: iv}} = Evp.bytes_to_key("my-secret-password")

If an invalid salt is supplied {:error, message} is returned.

Installation

If available in Hex, the package can be installed by adding evp to your list of dependencies in mix.exs:

def deps do
  [
    {:evp, "~> 0.1.0"}
  ]
end