My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

Welcome

PassLib is a password hashing library for Python, which provides cross-platform implementations of over 30 password hashing algorithms; as well as a framework for managing and migrating existing password hashes.

It's designed to be useful for any task from quickly verifying a hash found in a unix system's /etc/shadow file, to providing full-strength password hashing for multi-user application.

News

2012-05-01 - Passlib 1.6 released. New hash algorithms, speedups, and cleanups - see the release notes for details.

2011-10-08 - Passlib 1.5.3 released. This fixes a bug in Passlib's BCrypt hash generation.

2011-09-19 - Passlib 1.5.2 released. This is a minor bugfix release, mainly fixing some Django issues.

old news

Documentation

Documentation of the latest release of Passlib can always be found at http://packages.python.org/passlib.

Questions about usage, features, or future development directions? Feel free to post on our mailinglist.

Downloads

The latest release of Passlib is always available at PyPI, as well as from the downloads page on this site. All downloads are signed with the GPG key 4CE1ED31.

For the latest development edition, see our mercurial repository.

Usage

A quick example of using passlib to integrate into a new application:

>>> #import the context under an app-specific name (so it can easily be replaced later)
>>> from passlib.apps import custom_app_context as pwd_context

>>> #encrypting a password...
>>> hash = pwd_context.encrypt("somepass")
>>> hash
'$6$rounds=36122$kzMjVFTjgSVuPoS.$zx2RoZ2TYRHoKn71Y60MFmyqNPxbNnTZdwYD8y2atgoRIp923WJSbcbQc6Af3osdW96MRfwb5Hk7FymOM6D7J1'

>>> #verifying a password...
>>> ok = pwd_context.verify("somepass", hash)
True
>>> ok = pwd_context.verify("letmein", hash)
False

For more details and an extended set of examples, see the full documentation; This example barely touches on the range of features available.

Development

For the latest development edition, see our mercurial repository.

If you have bugs, questions, or code to contribute, please contact us on the passlib mailinglist.

PassLib is actively being developed, and we are interested in feedback, as well as enhancing passlib's architecture to support a broad range of use-cases and algorithms.

Powered by Google Project Hosting