erlang-bcrypt is a wrapper around the OpenBSD Blowfish password hashing algorithm, as described in "A Future-Adaptable Password Scheme" by Niels Provos and David Mazieres.
Build it:
make
Run it:
erl -pa ebin
Start the sasl and crypto applications:
1> ok = application:start(sasl). ok 2> ok = application:start(crypto). ok
Hash a password using a salt with the default number of rounds:
4> Hash = bcrypt:hashpw("foo", bcrypt:gen_salt()). "$2...000"
Verify the password:
5> Hash =:= bcrypt:hashpw("foo", Hash). true 6> Hash =:= bcrypt:hashpw("bar", Hash). false
Authors: Hunter Morris (http://skarab.com/)