blob: 4c00293375001c234af51a08adf0ec57a12d37a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
=============================================
:mod:`passlib` - Crypt Algorithms
=============================================
.. currentmodule:: passlib
All of the crypt algorithms must inherit from :class:`CryptHandler`,
which defines a common interface all algorithms must support.
You may use the algorithms directly, by creating
an instance and calling it as described in :doc:`Implementing a Crypt Algorithm <implementation>`.
However, you will normally will not need to deal with the internals of the algorithms
directly, but rather take advantage of one of the predefined algorithms,
through the :doc:`frontend functions <quickstart>` or a
custom :doc:`crypt context <contexts>`.
Standard Algorithms
===================
The following algorithms are all standard password hashing algorithms
used by various Posix operating systems over the years.
.. note::
BPS tries to use external accelaration for these classes when possible,
but provides a pure-python fallback so that these algorithms will
ALWAYS be available for use.
.. autoclass:: UnixCrypt
.. autoclass:: Md5Crypt
.. autoclass:: Sha256Crypt
.. autoclass:: Sha512Crypt
.. autoclass:: BCrypt
Database Algorithms
===================
BPS also provides implementations of the hash
algorithms used by MySql and PostgreSQL.
.. autoclass:: Mysql10Crypt
.. autoclass:: Mysql41Crypt
.. autoclass:: PostgresMd5Crypt
.. data:: mysql_context
This context object contains the algorithms used by MySql 4.1 and newer
for storing user passwords.
.. data:: postgres_context
This context object should be able to read/write/verify
the values found in the password field of the pg_shadow table in Postgres.
|