-
Carta.tech
-
Packages
-
python-bcrypt
-
1
- python-bcrypt.1
- A module to implement openbsd's blowfish password hash algorithm this manual page was written for the debian distribution because the original program does not have a manual page. python-bcrypt is a python module implementating 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 this system hashes passwords using a version of bruce schneier's blowfish block cipher with modifications designed to raise the cost of off-line password cracking. the computation cost of the algorithm is parametrised, so it can be increased as computers get faster. a simple example demonstrates most of the features: import bcrypt # hash a password for the first time hashed = bcrypt.hashpw(password, bcrypt.gensalt()) # gensalt's log_rounds parameter determines the complexity # the work factor is 2**log_rounds, and the default is 12 hashed = bcrypt.hashpw(password, bcrypt.gensalt(10)) # check that an unencrypted password matches one that has # previously been hashed if bcrypt.hashpw(plaintext, hashed) == hashed: print "it matches" else: print "it does not match"