ok
Direktori : /proc/self/root/proc/self/root/proc/thread-self/root/lib64/python2.7/site-packages/dns/ |
Current File : //proc/self/root/proc/self/root/proc/thread-self/root/lib64/python2.7/site-packages/dns/entropy.pyc |
� !`Nc @ s} d d l Z d d l Z y d d l Z Wn e k rG d d l Z n Xd e f d � � YZ e � Z d � Z d � Z d S( i����Nt EntropyPoolc B sM e Z d d � Z e d � Z d � Z d � Z d � Z d � Z d � Z RS( c C s� d | _ d | _ d | _ t j � | _ y( d d l } | j � | _ d | _ Wn] y( d d l } | j � | _ d | _ Wq� d d l } | j � | _ d | _ q� Xn Xd | j | _ | d k r� | j | � t | _ n t | _ d S( Ni i����i i t ( t pool_indext Nonet digestt next_bytet _threadingt Lockt lockt hashlibt sha1t hasht hash_lent shat newt md5t poolt stirt Truet seededt False( t selft seedR R R ( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyt __init__ s, c C s� | s | j j � n z� g | j D] } t | � ^ q# } x^ | D]V } | j | j k rf d | _ n t | � d @} | | j c | N<| j d 7_ qB Wd j g | D] } t | � ^ q� � | _ Wd | s� | j j � n Xd S( Ni i� i t ( R t acquireR t ordR R t joint chrt release( R t entropyt already_lockedt ct bytest b( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyR 1 s " /c C s� | j s� y t j d � } WnZ y7 t d d d � } z | j d � } Wd | j � XWqy t t j � � } qy Xn Xt | _ | j | t � n d S( Ni s /dev/urandomt ri ( R t ost urandomt filet readt closet strt timeR R ( R R R# ( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyt _maybe_seedA s c C s� | j j � | j � z� | j d k s; | j | j k r | j j | j � | j j � | _ | j | j t � d | _ n t | j | j � } | j d 7_ Wd | j j � X| S( Ni i ( R R R+ R R R R R t updateR R R R R ( R t value( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyt random_8Q s !c C s | j � d | j � S( Ni ( R. ( R ( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyt random_16` s c C s | j � d | j � S( Ni ( R/ ( R ( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyt random_32c s c C s� | | d } | d k r) t d � � n | d k rG | j } d } n- | d k re | j } d } n | j } d } | | | � | d S( Ni l s too bigi l �� i i�� i� ( t ValueErrorR0 R/ R. ( R t firstt lastt sizet randt max( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyt random_betweenf s N( t __name__t __module__R R R R R+ R. R/ R0 R7 ( ( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyR s c C s t j � S( N( R R/ ( ( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyR/ w s c C s t j | | � S( N( R R7 ( R2 R3 ( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyt betweenz s ( R$ R* t threadingR t ImportErrort dummy_threadingt objectR R R/ R: ( ( ( s1 /usr/lib64/python2.7/site-packages/dns/entropy.pyt <module> s ^