summaryrefslogtreecommitdiff
path: root/docs/lib/passlib.sqldb.rst
blob: 282d1e30c33712bd674609926653eea4b314c43d (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
============================================
:mod:`passlib.sqldb` - SQL Database Helpers
============================================

.. module:: passlib.sqldb
    :synopsis: frontend for encrypting & verifying passwords used in various sql databases

PostgreSQL
==========
This module provides a single pre-configured :class:`CryptContext` instance
which should be capable of recognizing passwords in modern postgres systems:

.. object:: postgres_context

    This object should recognize password hashes stores in postgres' pg_shadow table.
    it can recognize :class:`~passlib.hash.postgres_md5` hashes,
    as well as plaintext hashes.
    It defaults to postgres_md5 when generating new hashes.

    note that the username must be provided whenever encrypting or verifying a postgres hash.

MySQL
=====
This module provides two pre-configured :class:`CryptContext` instances
for handling MySQL user passwords:

.. object:: mysql_context

    This object should recognize the new :class:`~passlib.hash.mysql41` hashes,
    as well as any legacy :class:`~passlib.hash.mysql323` hashes.
    It defaults to mysql41 when generating new hashes.

.. object:: mysql3_context

    This object is for use with older MySQL deploys which only recognize
    the :class:`~passlib.hash.mysql323` hash.