Module bcrypt_nif

Wrapper around the OpenBSD Blowfish password hashing algorithm, as described in "A Future-Adaptable Password Scheme" by Niels Provos and David Mazieres: http://www.openbsd.org/papers/bcrypt-paper.ps.

Copyright © 2011 Hunter Morris

Authors: Hunter Morris (hunter.morris@smarkets.com).

Description

Wrapper around the OpenBSD Blowfish password hashing algorithm, as described in "A Future-Adaptable Password Scheme" by Niels Provos and David Mazieres: http://www.openbsd.org/papers/bcrypt-paper.ps

Function Index

create_ctx/0Create a context which hashes passwords in a separate thread.
gen_salt/1Generate a random text salt for use with hashpw/3.
hashpw/5Hash the specified password and the salt using the OpenBSD Blowfish password hashing algorithm.
init/0Load the bcrypt NIFs.

Function Details

create_ctx/0

create_ctx() -> term()

Create a context which hashes passwords in a separate thread.

gen_salt/1

gen_salt(LogRounds::integer()) -> string()

Generate a random text salt for use with hashpw/3. LogRounds defines the complexity of the hashing, increasing the cost as 2^log_rounds.

hashpw/5

hashpw(Ctx::term(), Ref::reference(), Pid::pid(), Password::binary(), Salt::binary()) -> string()

Hash the specified password and the salt using the OpenBSD Blowfish password hashing algorithm. Returns the hashed password.

init/0

init() -> ok

Load the bcrypt NIFs


Generated by EDoc