Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/lib/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/lib/md5crypt.pyc

ó
ÍÿŠTc@sgdZdZdZddlmZd„Zd„Zdd„ZeZ	e
dkrced	d
ƒGHndS(s4md5crypt.py - Provides interoperable MD5-based crypt() function

SYNOPSIS

	import md5crypt.py

	cryptedpassword = md5crypt.md5crypt(password, salt);

DESCRIPTION

unix_md5_crypt() provides a crypt()-compatible interface to the
rather new MD5-based crypt() function found in modern operating systems.
It's based on the implementation found on FreeBSD 2.2.[56]-RELEASE and
contains the following license in it:

 "THE BEER-WARE LICENSE" (Revision 42):
 <phk@login.dknet.dk> wrote this file.  As long as you retain this notice you
 can do whatever you want with this stuff. If we meet some day, and you think
 this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp

apache_md5_crypt() provides a function compatible with Apache's
.htpasswd files. This was contributed by Bryan Hart <bryan@eai.com>.

s$1$s@./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyziÿÿÿÿ(tmd5cCsGd}x:|ddkrB|d}|t|d@}|d?}q	W|S(Ntiii?i(tITOA64(tvtntret((s:/usr/lib/python2.7/dist-packages/landscape/lib/md5crypt.pytto64.s
cCst||dƒS(Ns$apr1$(tunix_md5_crypt(tpwtsalt((s:/usr/lib/python2.7/dist-packages/landscape/lib/md5crypt.pytapache_md5_crypt7sc
CsÂ|dkrt}n|t|ƒ |kr>|t|ƒ}nddl}|j|ddƒd}|d }|||}t|||ƒjƒ}xKtt|ƒddƒD]1}|dkrÑ||d }q®||| }q®Wt|ƒ}x?|r0|d@r|tdƒ}n||d}|d?}qòWt|ƒjƒ}x¤tdƒD]–}d	}|d@rs||}n||d }|d
r˜||}n|dr¯||}n|d@rÊ||d }n
||}t|ƒjƒ}qPWd	}	|	t	t
t|dƒƒd>t
t|dƒƒd>Bt
t|d
ƒƒBdƒ}	|	t	t
t|dƒƒd>t
t|dƒƒd>Bt
t|dƒƒBdƒ}	|	t	t
t|dƒƒd>t
t|dƒƒd>Bt
t|dƒƒBdƒ}	|	t	t
t|d
ƒƒd>t
t|dƒƒd>Bt
t|dƒƒBdƒ}	|	t	t
t|dƒƒd>t
t|dƒƒd>Bt
t|dƒƒBdƒ}	|	t	t
t|dƒƒdƒ}	||d|	S(Niÿÿÿÿt$iiiiðÿÿÿiièRiiiiii
iii	ii
ii(tNonetMAGICtlentstringtsplitRtdigesttrangetchrRtinttord(
RR	tmagicRtctxtfinaltpltitctx1tpasswd((s:/usr/lib/python2.7/dist-packages/landscape/lib/md5crypt.pyR<s\	
	








MMMMM#t__main__tcatthatN(t__doc__R
Rtlandscape.lib.hashlibRRR
RRtmd5cryptt__name__(((s:/usr/lib/python2.7/dist-packages/landscape/lib/md5crypt.pyt<module>'s			`