
    Eh
                     8    d Z ddlmZ ddlZddlZ G d d      Zy)z$Id$    )RandomPool_DeprecationWarningNc                   Z    e Zd ZdZddZd Zd ZddZddZddZ	dd	Z
dd
Zd ZddZy)
RandomPoolz\Deprecated.  Use Random.new() instead.

    See http://www.pycrypto.org/randpool-broken
    Nc                     t        j                  dt               t        j                  j                         | _        || _        | j                  dz  | _        | j                  | _	        y )NzqThis application uses RandomPool, which is BROKEN in older releases.  See http://www.pycrypto.org/randpool-broken   )
warningswarnr   CryptoRandomnew_RandomPool__rngbytesbitsentropy)selfnumbytescipherhashfiles        U/var/www/html/bid_assistant/venv/lib/python3.12/site-packages/Crypto/Util/randpool.py__init__zRandomPool.__init__&   sL      J)	+]]&&(

JJN	yy    c                 8    | j                   j                  |      S )N)r   readr   Ns     r   	get_byteszRandomPool.get_bytes.   s    zzq!!r   c                     | xj                   |z  c_         | j                   dk  rd| _         y | j                   | j                  kD  r| j                  | _         y y )Nr   )r   r   )r   nbitss     r   _updateEntropyEstimatez!RandomPool._updateEntropyEstimate1   sC    <<!DL\\DII%99DL &r   c                 8    | j                   j                          y)zDummy _randomize() functionNr   flush)r   r   devnames      r   
_randomizezRandomPool._randomize8       

r   c                 8    | j                   j                          y)zDummy randomize() functionNr"   r   s     r   	randomizezRandomPool.randomize<   r&   r   c                 8    | j                   j                          y)zDummy stir() functionNr"   r   ss     r   stirzRandomPool.stir@   r&   r   c                 8    | j                   j                          y)zDummy stir_n() functionNr"   r   s     r   stir_nzRandomPool.stir_nD   r&   r   c                 8    | j                   j                          y)zDummy add_event() functionNr"   r*   s     r   	add_eventzRandomPool.add_eventH   r&   r   c                 $    | j                  |      S )zDummy getBytes() function)r   r   s     r   getByteszRandomPool.getBytesL   s    ~~a  r   c                 "    | j                         S )zDummy addEvent() function)r0   )r   eventr+   s      r   addEventzRandomPool.addEventP   s    ~~r   )   NNN)r   z/dev/urandom)r   ) )   )__name__
__module____qualname____doc__r   r   r    r%   r(   r,   r.   r0   r2   r5    r   r   r   r   !   s9    !"%! r   r   )__revision__Crypto.pct_warningsr   Crypto.Randomr
   r   r   r=   r   r   <module>rA      s   6  =  1  1 r   