Current File : //usr/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyo
�
Bd\Rc@sNdZdgZddlZddlmZdefd��YZd�ZdS(s$Id$t
WindowsRNGi����N(tBaseRNGcBs2eZdZd�Zd�Zd�Zd�ZRS(s<CryptGenRandom>cCs tj�|_tj|�dS(N(t	winrandomtnewt_WindowsRNG__winrandRt__init__(tself((s</usr/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyR#scCs;|jrtd��n|jjd�}tj|�dS(s*Work around weakness in Windows RNG.

        The CryptGenRandom mechanism in some versions of Windows allows an
        attacker to learn 128 KiB of past and future output.  As a workaround,
        this function reads 128 KiB of 'random' data from Windows and discards
        it.

        For more information about the weaknesses in CryptGenRandom, see
        _Cryptanalysis of the Random Number Generator of the Windows Operating
        System_, by Leo Dorrendorf and Zvi Gutterman and Benny Pinkas
        http://eprint.iacr.org/2007/419
        sI/O operation on closed filei�iNi(tclosedt
ValueErrorRt	get_bytesRtflush(Rtdata((s</usr/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyR
's
	cCs
d|_dS(N(tNoneR(R((s</usr/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyt_close:scCs*|j�|jj|�}|j�|S(N(R
RR	(RtNR((s</usr/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyt_read=s

(t__name__t
__module__tnameRR
R
R(((s</usr/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyRs
			cOs
t||�S(N(R(targstkwargs((s</usr/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyRGs(t__revision__t__all__Rtrng_baseRRR(((s</usr/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyt<module>s
	(