Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/site-packages/Crypto/Util/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/site-packages/Crypto/Util/__pycache__/randpool.cpython-35.pyc



�/�O�
�@sEdZddlmZddlZddlZGdd�d�ZdS)z$Id$�)�RandomPool_DeprecationWarningNc@s�eZdZdZdddddd�Zdd�Zdd	�Zd
ddd
�Zd
dd�Zddd�Z	ddd�Z
ddd�Zdd�Zddd�Z
dS)�
RandomPoolz\Deprecated.  Use Random.new() instead.

    See http://www.pycrypto.org/randpool-broken
    �NcCsKtjdt�tjj�|_||_|jd|_|j|_	dS)NzqThis application uses RandomPool, which is BROKEN in older releases.  See http://www.pycrypto.org/randpool-broken�)
�warnings�warnr�CryptoZRandom�new�_RandomPool__rng�bytes�bits�entropy)�selfZnumbytesZcipher�hash�file�r�G/opt/alt/python35/lib64/python3.5/site-packages/Crypto/Util/randpool.py�__init__&s		zRandomPool.__init__cCs|jj|�S)N)r
�read)r�Nrrr�	get_bytes.szRandomPool.get_bytescCsL|j|7_|jdkr*d|_n|j|jkrH|j|_dS)Nr)r
r)rZnbitsrrr�_updateEntropyEstimate1s
z!RandomPool._updateEntropyEstimaterz/dev/urandomcCs|jj�dS)zDummy _randomize() functionN)r
�flush)rrZdevnamerrr�
_randomize8szRandomPool._randomizecCs|jj�dS)zDummy randomize() functionN)r
r)rrrrr�	randomize<szRandomPool.randomize�cCs|jj�dS)zDummy stir() functionN)r
r)r�srrr�stir@szRandomPool.stir�cCs|jj�dS)zDummy stir_n() functionN)r
r)rrrrr�stir_nDszRandomPool.stir_ncCs|jj�dS)zDummy add_event() functionN)r
r)rrrrr�	add_eventHszRandomPool.add_eventcCs
|j|�S)zDummy getBytes() function)r)rrrrr�getBytesLszRandomPool.getBytescCs
|j�S)zDummy addEvent() function)r )rZeventrrrr�addEventPszRandomPool.addEvent)�__name__�
__module__�__qualname__�__doc__rrrrrrrr r!r"rrrrr!sr)�__revision__ZCrypto.pct_warningsrZ
Crypto.Randomrrrrrrr�<module>s