ó !`Nc@s}ddlZddlZyddlZWnek rGddlZnXdefd„ƒYZeƒZd„Z d„Z dS(iÿÿÿÿNt EntropyPoolcBsMeZdd„Zed„Zd„Zd„Zd„Zd„Z d„Z RS(cCsôd|_d|_d|_tjƒ|_y(ddl}|jƒ|_ d|_ Wn]y(ddl }|j ƒ|_ d|_ Wq²ddl }|j ƒ|_ d|_ q²XnXd|j |_|dk rç|j|ƒt|_n t|_dS(Niiÿÿÿÿiis(t pool_indextNonetdigestt next_bytet _threadingtLocktlockthashlibtsha1thashthash_lentshatnewtmd5tpooltstirtTruetseededtFalse(tselftseedRR R((s1/usr/lib64/python2.7/site-packages/dns/entropy.pyt__init__s,           cCsæ|s|jjƒnz²g|jD]}t|ƒ^q#}x^|D]V}|j|jkrfd|_nt|ƒd@}||jc|N<|jd7_qBWdjg|D]}t|ƒ^q©ƒ|_Wd|sá|jjƒnXdS(Niiÿit( RtacquireRtordRR tjointchrtrelease(Rtentropytalready_lockedtctbytestb((s1/usr/lib64/python2.7/site-packages/dns/entropy.pyR1s"  /cCs™|js•ytjdƒ}WnZy7tdddƒ}z|jdƒ}Wd|jƒXWqyttjƒƒ}qyXnXt|_|j |tƒndS(Nis /dev/urandomtri( RtosturandomtfiletreadtclosetstrttimeRR(RRR"((s1/usr/lib64/python2.7/site-packages/dns/entropy.pyt _maybe_seedAs  cCsº|jjƒ|jƒzŽ|jdks;|j|jkr|jj|j ƒ|jjƒ|_|j |jt ƒd|_nt |j|jƒ}|jd7_Wd|jj ƒX|S(Nii(RRR*RRRR R tupdateRRRRR(Rtvalue((s1/usr/lib64/python2.7/site-packages/dns/entropy.pytrandom_8Qs  ! cCs|jƒd|jƒS(Ni(R-(R((s1/usr/lib64/python2.7/site-packages/dns/entropy.pyt random_16`scCs|jƒd|jƒS(Ni(R.(R((s1/usr/lib64/python2.7/site-packages/dns/entropy.pyt random_32cscCs‹||d}|dkr)tdƒ‚n|dkrG|j}d}n-|dkre|j}d}n|j}d}|||ƒ|dS( Nilstoo bigilÿÿiiÿÿiÿ(t ValueErrorR/R.R-(Rtfirsttlasttsizetrandtmax((s1/usr/lib64/python2.7/site-packages/dns/entropy.pytrandom_betweenfs        N( t__name__t __module__RRRRR*R-R.R/R6(((s1/usr/lib64/python2.7/site-packages/dns/entropy.pyRs      cCs tjƒS(N(RR.(((s1/usr/lib64/python2.7/site-packages/dns/entropy.pyR.wscCstj||ƒS(N(RR6(R1R2((s1/usr/lib64/python2.7/site-packages/dns/entropy.pytbetweenzs( R#R)t threadingRt ImportErrortdummy_threadingtobjectRRR.R9(((s1/usr/lib64/python2.7/site-packages/dns/entropy.pyts   ^