blob: 9348f7f8b29a99bdd04b3131d800b506c7c05a69 (
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
|
"""
apache support
http://httpd.apache.org/docs/2.2/misc/password_encryptions.html
http://httpd.apache.org/docs/2.0/programs/htpasswd.html
NOTE: digest format is md5(user ":" realm ":" passwd).hexdigest()
file is "user:realm:hash"
"""
#=========================================================
#imports
#=========================================================
from __future__ import with_statement
#core
import logging; log = logging.getLogger(__name__)
#site
#libs
from passlib.drivers.import postgres_md5
from passlib.base import CryptContext
#pkg
#local
__all__ = [
'postgres_md5',
'postgres_context',
]
#=========================================================
#db contexts
#=========================================================
postgres_context = CryptContext([postgres_md5])
#=========================================================
# eof
#=========================================================
|