Packages

Drupal 7 compatible password hashing for Elixir

Current section

Files

Jump to
drupal7_password_hash lib drupal7_password_hash.ex
Raw

lib/drupal7_password_hash.ex

defmodule Drupal7PasswordHash do
@moduledoc """
Documentation for `Drupal7PasswordHash`.
"""
use Comeonin
alias Drupal7PasswordHash.Base
@impl true
def hash_pwd_salt(password, opts \\ []) do
Base.hash_pwd_salt(password, opts)
end
@impl true
def verify_pass(password, stored_hash) do
["drupal7", hash, encoded] = String.split(stored_hash, "$", trim: true)
Base.verify_pass(password, hash, encoded)
end
end