crypto.password.bcrypt

Functions for encrypting passwords using the widely-used bcrypt algorithm.

See: http://bcrypt.sourceforge.net/

check

(check raw encrypted)

Compare a raw string with a string encrypted with the encrypt function. Returns true if the string matches, false otherwise.

encrypt

(encrypt raw)(encrypt raw work-factor)

Encrypt a password string using the BCrypt algorithm. The optional work factor is the log2 of the number of hashing rounds to apply. The default work factor is 11.