Edit: /usr/lib/python2.6/crypt.pyc (3043B)
Ńň
Ť gc @ sQ d Z d d k Z d d k Z d d k l Z d d k l Z e i e i d Z d e d d f d YZ
d d Z d d
Z
e
d d d d
Z e
d d d d Z e
d d d d Z e
d d d d Z g Z xT e e e f D]C Z e
d e Z e o' e e e i j o e i e qó qó We i e [ [ d S( sť Wrapper to the POSIX crypt library call and associated functionality.
Note that the ``methods`` and ``METHOD_*`` attributes are non-standard
extensions to Python 2.6, backported from 3.3i˙˙˙˙N( t choice( t
namedtuples ./t _Methods name ident salt_chars total_sizec B s e Z d Z d Z RS( si Class representing a salt method per the Modular Crypt Format or the
legacy 2-character crypt method.c C s d | i S( Ns
( t name( t self( ( s /usr/lib/python2.6/crypt.pyt __repr__ s ( t __name__t
__module__t __doc__R ( ( ( s /usr/lib/python2.6/crypt.pyR s c C sc | d j o t d } n | i o d | i n d } | d i d t | i D 7} | S( sť Generate a salt for the specified method.
If not specified, the strongest available method will be used.
This is a non-standard extension to Python 2.6, backported from 3.3
i s $%s$t c s s x | ] } t t Vq Wd S( N( R t
_saltchars( t .0t _( ( s /usr/lib/python2.6/crypt.pys # s N( t Nonet methodst identt joint ranget
salt_chars( t methodt s( ( s /usr/lib/python2.6/crypt.pyt mksalt s
&c C s= | d j p t | t o t | } n t i | | S( sN Return a string representing the one-way hash of a password, with a salt
prepended.
If ``salt`` is not specified or is ``None``, the strongest
available method will be selected and a salt generated. Otherwise,
``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as
returned by ``crypt.mksalt()``.
Note that these are non-standard extensions to Python 2.6's crypt.crypt()
entrypoint, backported from 3.3: the standard Python 2.6 crypt.crypt()
entrypoint requires two strings as the parameters, and does not support
keyword arguments.
N( R
t
isinstanceR R t _cryptt crypt( t wordt salt( ( s /usr/lib/python2.6/crypt.pyR ' s t CRYPTi i
t MD5t 1i i" t SHA256t 5i i? t SHA512t 6ij R ( R R t stringt randomR t collectionsR t
ascii_letterst digitsR
R R
R R t METHOD_CRYPTt
METHOD_MD5t
METHOD_SHA256t
METHOD_SHA512R t _methodt _resultt lent
total_sizet append( ( ( s /usr/lib/python2.6/crypt.pyt s(