eaiovnaovbqoebvqoeavibavo  V~gc@sdZdZeeZeeZeZedZd Zd ZddZ ddZ y.ddl Z e Z eZ eje jZWnek re Z eZ nXxUeD]MZye eee>> import hashlib >>> m = hashlib.md5() >>> m.update("Nobody inspects") >>> m.update(" the spammish repetition") >>> m.digest() '\xbbd\x9c\x83\xdd\x1e\xa5\xc9\xd9\xde\xc9\xa1\x8d\xf0\xff\xe9' More condensed: >>> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest() 'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2' tmd5tsha1tsha224tsha256tsha384tsha512tnewtalgorithms_guaranteedtalgorithms_availablet algorithmst pbkdf2_hmaccCsy|dkr"ddl}|jS|dkrAddl}|jS|dkrddl}|d }|d krv|jS|d kr|jSnK|dkrddl}|d }|dkr|jS|dkr|jSnWnt k rnXt d|dS(NtSHA1RitMD5RtSHA256RtSHA224Rit256t224tSHA512RtSHA384Rt512t384sunsupported hash type (R R(R R(R RRR(RRRR( t_shaRt_md5t_sha256RRt_sha512RRt ImportErrort ValueError(tnameRRRtbsR((s,/opt/alt/python27/lib64/python2.7/hashlib.pyt__get_builtin_constructorHs0                cCsGy"ttd|}||SWnttfk rBt|SXdS(Ntopenssl_(tgetattrt_hashlibtAttributeErrorRR(Rtf((s,/opt/alt/python27/lib64/python2.7/hashlib.pyt__get_openssl_constructords tcCst||S(s|new(name, string='') - Return a new hashing object using the named algorithm; optionally initialized with a string. (R(Rtstring((s,/opt/alt/python27/lib64/python2.7/hashlib.pyt__py_newpscCs9ytj||SWntk r4t||SXdS(s|new(name, string='') - Return a new hashing object using the named algorithm; optionally initialized with a string. N(R RRR(RR%((s,/opt/alt/python27/lib64/python2.7/hashlib.pyt __hash_newws iNscode for hash %s was not found.(R ccs|]}t|dAVqdS(i\N(tchr(t.0tx((s,/opt/alt/python27/lib64/python2.7/hashlib.pys siccs|]}t|dAVqdS(i6N(R((R)R*((s,/opt/alt/python27/lib64/python2.7/hashlib.pys scCsCt|tst|nt|ttfsHtt|}nt|ttfsrtt|}nt|}t|}t|dd}t||krt||j }n|d|t|}|j |j t |j |j t ||d}|dkr4t|n|d krL|j}n|dkrgt|ndt|jd} d} d} xt| |kr:||tjd | } ttj| d } x@t|dD].}|| } | ttj| d N} qW| d7} | tj| | 7} qW| | S( sPassword based key derivation function 2 (PKCS #5 v2.0) This Python implementations based on the hmac module about as fast as OpenSSL's PKCS5_PBKDF2_HMAC for short passwords and much faster for long passwords. t block_sizei@scSsB|j}|j}|j||j|j|jS(N(tcopytupdatetdigest(tmsgtinnertouterticpytocpy((s,/opt/alt/python27/lib64/python2.7/hashlib.pytprfs    is%%0%ixiR$s>IiN(t isinstancetstrt TypeErrortbytest bytearraytbufferRRtlenR.R-t translatet _trans_36t _trans_5CRtNonet digest_sizetstructtpacktinttbinasciithexlifytxranget unhexlify(t hash_nametpasswordtsaltt iterationstdklenR0R1t blocksizeR4thex_format_stringtdkeytlooptprevtrkeyti((s,/opt/alt/python27/lib64/python2.7/hashlib.pyR sB         (RRRRRR(RRRR R (t__doc__t__always_supportedtsetRRR t__all__RR#R&R'R Rt __get_hashtuniontopenssl_md_meth_namesRt __func_nametglobalsRtloggingt exceptionR RDRAtjointrangeR>R=R?(((s,/opt/alt/python27/lib64/python2.7/hashlib.pyt8sH              9