See also

What’s new in Passlib 1.8

# Passlib latest documentation

Note

2020-05-01: Passlib’s public repository has moved to Heptapod!

Due to BitBucket deprecating Mercurial support, Passlib’s public repository and issue tracker has been relocated. It’s now located at https://foss.heptapod.net/python-libs/passlib, and is powered by Heptapod. Hosting is being graciously provided by the people at Octobus and CleverCloud!

## Welcome

Passlib is a password hashing library for Python 3, which provides cross-platform implementations of over 30 password hashing algorithms, as well as a framework for managing existing password hashes. It’s designed to be useful for a wide range of tasks, from verifying a hash found in /etc/shadow, to providing full-strength password hashing for multi-user application.

As a quick sample, the following code hashes and then verifies a password using the PBKDF2-SHA256 algorithm:

    >>> # import the hash algorithm
    >>> from passlib.hash import pbkdf2_sha256

    >>> # generate new salt, and hash a password
    >>> hash = pbkdf2_sha256.hash("toomanysecrets")
    >>> hash
    '$pbkdf2-sha256$29000$N2YMIWQsBWBMae09x1jrPQ$1t8iyB2A.WF/Z5JZv.lfCIhXXN33N23OSgQYThBYRfk'

    >>> # verifying the password
    >>> pbkdf2_sha256.verify("toomanysecrets", hash)
    True
    >>> pbkdf2_sha256.verify("joshua", hash)
    False

## Online Resources

> System Message: ERROR/3 (/build/python-passlib-EzVFOb/python-passlib-1.9.3/docs/index.rst, line 90)

> Error in “table” directive: unknown option: “column-alignment”.

>     .. table::
>         :class: fullwidth
>         :column-alignment: lr

>         =================== ===================================================
>         Latest Docs:        `<https://passlib.readthedocs.io>`_
>         Latest News:        `<https://foss.heptapod.net/python-libs/passlib/wikis/home>`_
>         Public Repo:        `<https://foss.heptapod.net/python-libs/passlib>`_
>         Mailing List:       `<https://groups.google.com/group/passlib-users>`_
>         Downloads @ PyPI:   `<https://pypi.python.org/pypi/passlib>`_
>         =================== ===================================================

## Hosting

Thanks to the people at Octobus and CleverCloud for providing the repository / issue tracker hosting, as well as development of Heptapod!

Thanks to ReadTheDocs for providing documentation hosting!