blob: 6ed165adb96125ca3af9194b8f383cdc09adb6ac (
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
|
"""passlib - implementation of various password hashing functions"""
#=========================================================
#imports
#=========================================================
#core
import logging; log = logging.getLogger(__name__)
#site
#libs
from passlib.base import CryptContext
#pkg
#local
__all__ = [
#postgres
'postgres_plaintext',
'postgres_md5',
'postgres_context',
#mysql
'mysql323',
'mysql41',
'mysql3_context',
'mysql_context'
]
#=========================================================
#postgres
#=========================================================
from passlib.drivers.postgres import postgres_plaintext, postgres_md5
postgres_context = CryptContext([postgres_plaintext, postgres_md5])
#=========================================================
#mysql
#=========================================================
from passlib.drivers.mysql import mysql323, mysql41
mysql3_context = CryptContext([mysql323])
mysql_context = CryptContext([mysql323, mysql41])
#=========================================================
#TODO:
#=========================================================
#oracle - http://www.notesbit.com/index.php/scripts-oracle/oracle-11g-new-password-algorithm-is-revealed-by-seclistsorg/
#=========================================================
# eof
#=========================================================
|