PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  7YKc@sdZddlmZddlmZddlmZddlmZddl m Z m Z dZdefd YZddd Zeee_d Zd Zed krendS(s1.1i(tpack(tb2a_hex(trandint(t b64encode(thmact hmac_sha1cCsEdjgt||D](\}}tt|t|A^qS(Nt(tjointziptchrtord(tatbtxty((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pytstrxorMstPBKDF2cBsVeZdZdeedZdZdZdZdZ dZ dZ RS( sPBKDF2.py : PKCS#5 v2.0 Password-Based Key Derivation This implementation takes a passphrase and a salt (and optionally an iteration count, a digest module, and a MAC module) and provides a file-like object from which an arbitrarily-sized key can be read. If the passphrase and/or salt are unicode objects, they are encoded as UTF-8 before they are processed. The idea behind PBKDF2 is to derive a cryptographic key from a passphrase and a salt. PBKDF2 may also be used as a strong salted password hash. The 'crypt' function is provided for that purpose. Remember: Keys generated using PBKDF2 are only as strong as the passphrases they are derived from. icCsGt|s|j}n||_||_|j||||jdS(N(tcallabletnewt_PBKDF2__macmodulet_PBKDF2__digestmodulet_setupt _pseudorandom(tselft passphrasetsaltt iterationst digestmodulet macmodule((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pyt__init__ds     cCs%|jd|d|d|jjS(s&Pseudorandom function. e.g. HMAC-SHA1tkeytmsgt digestmod(RRtdigest(RRR((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pyRlscCs|jrtdnt|j}|jg}|j}xa||kr|d7}|dkrptdn|j|}|j||t|7}q?Wdj|}|| }|||_||_|S(s'Read the specified number of key bytes.sfile-like object is closediIsderived key too longR( tclosedt ValueErrortlent _PBKDF2__buft_PBKDF2__blockNumt OverflowErrort _PBKDF2__ftappendR(Rtbytestsizetblockstitblocktbuftretval((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pytreadqs"         cCsd|kr|dkst|j|j|jtd|}|}xBtdd|jD]*}|j|j|}t||}q`W|S(NiIs!Li(tAssertionErrort _PBKDF2__prft_PBKDF2__passphraset _PBKDF2__saltRtxranget_PBKDF2__iterationsR(RR-tUtresulttj((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pyt__fs%cCst|j|S(sxRead the specified number of octets. Return them as hexadecimal. Note that len(obj.hexread(n)) == 2*n. (RR1(Rtoctets((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pythexreadscCst|tr!|jd}nt|ts?tdnt|tr`|jd}nt|ts~tdnt|ttfstdn|dkrtdnt|stdn||_ ||_ ||_ ||_ d|_ d |_t|_dS( NsUTF-8s!passphrase must be str or unicodessalt must be str or unicodesiterations must be an integerisiterations must be at least 1sprf must be callableiR(t isinstancetunicodetencodetstrt TypeErrortinttlongR#RR4R5R7R3R&R%tFalseR"(RRRRtprf((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pyRs*        cCs=|js9|`|`|`|`|`|`t|_ndS(sClose the stream.N(R"R4R5R7R3R&R%tTrue(R((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pytcloses ( t__name__t __module__t__doc__tSHA1tHMACRRR1R(R=RRH(((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pyRPs    cCs|dkrt}nt|tr9|jd}nt|tsWtdnt|trx|jd}nt|tstdn|jdr+|jddd!\}}}|d krd }q+t |d }|d |krt d n|}|dks+t d q+nd}x0|D](}||kr8t d|fq8q8W|dks||d krd }d|}nd||f}t |||j d}|dt |dS(sPBKDF2-based unix crypt(3) replacement. The number of iterations specified in the salt overrides the 'iterations' parameter. The effective hash length is 192 bits. sus-asciissalt must be a stringsUTF-8s word must be a string or unicodes$p5k2$s$iiRiis%xs Invalid saltis@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./sIllegal character %r in salts$p5k2$$s $p5k2$%x$%sis./N(tNonet _makesaltR>R?R@RARBt startswithtsplitRCR#RR1R(twordRRtdummyt convertedtallowedtchtrawhash((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pytcrypts<        cCsGdjgtdD]}tdtdd^q}t|dS(sReturn a 48-bit pseudorandom salt for crypt(). This function is not suitable for generating cryptographic secrets. Ris@Hiis./(RtrangeRRR(R-t binarysalt((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pyROs:cCs{ddlm}tdddjd}|d}||krRtdntddd jd }d }||krtdntd d dd jd }d}||krtdntd ddd jd }d}||krtdntddd}|jd}||jd7}||jd7}||jd7}||jd7}tdddjd}||krtdntdd}d}||krtdntdd}d}||krtdntd d!d"d#}d$}||krGtdntd%d&}d&}||krwtdnd'S((sModule self-testi(ta2b_hextpasswordsATHENA.MIT.EDUraeburniit cdedb5281bb2f801565a1122b2563515sself-test failedii t@5c08eb61fdf71e4e4ec3cf6ba1f5512ba7e52ddbc5e5142f708a31e2e62b1e13tXi@spass phrase equals block sizet@139c30c0966bc32ba55fdbf212530ac9c5ec59f1a452f5cc9ad940fea0598ed1iAspass phrase exceeds block sizet@9ccad6d468770cd51b10e6a68721be611a8b4d282601db3b36be9246915ec82at kickstartt workbenchiiiii(tcloadmtexecs,$p5k2$$exec$r1EWMCMk7Rlv3L/RNcFXviDefYa0hlqltgnus$p5k2$c$u9HvcT4d$.....s1$p5k2$c$u9HvcT4d$Sd1gwSVCLZYAuqZ25piRnbBEoAesaa/gtdclttUsch7fURi s1$p5k2$d$tUsch7fU$nqDkaxMDOFBeJsTSfABsyn.PYUXilHwLuΙωαννηςs0$p5k2$$KosHgqNo$9mjN8gqjt02hDoP0c2J0ABtLIwtot8cQN(tbinasciiR[RR1t RuntimeErrorR=RX(R[R9texpectedtf((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pyt test_pbkdf2sV           t__main__N(t __version__tstructRRiRtrandomRtbase64Rtbeaker.crypto.utilRRMRRLRtobjectRRNRXt staticmethodRORmRI(((s8/usr/lib/python2.7/site-packages/beaker/crypto/pbkdf2.pytCs s7  O