Module bcrypt_nif

Bcrypt Erlang wrapper.

Copyright © 2011 Hunter Morris

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

Description

Bcrypt Erlang wrapper.
The wrapper around the OpenBSD Blowfish password hashing algorithm, as described in: "A Future-Adaptable Password Scheme" by Niels Provos and David Mazieres.

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.

Function Details

create_ctx/0

create_ctx() -> Context

Create a context which hashes passwords in a separate thread.

gen_salt/1

gen_salt(LogRounds) -> Result

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, Ref, Pid, Password, Salt) -> Result

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


Generated by EDoc