Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/nt.pyc

ó
T:´Nc@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/lib/python2.7/dist-packages/Crypto/Random/OSRNG/nt.pyR#scCsS|jrtdƒ‚n|jjdƒ}t|ƒdksBt‚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€iNii(tclosedt
ValueErrorRt	get_bytestlentAssertionErrorRtflush(Rtdata((s:/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/nt.pyR's

	cCs
d|_dS(N(tNoneR(R((s:/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/nt.pyt_close:scCs*|jƒ|jj|ƒ}|jƒ|S(N(RRR	(RtNR
((s:/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/nt.pyt_read=s

(t__name__t
__module__tnameRRRR(((s:/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/nt.pyRs
			cOs
t||ŽS(N(R(targstkwargs((s:/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/nt.pyRGs(t__revision__t__all__Rtrng_baseRRR(((s:/usr/lib/python2.7/dist-packages/Crypto/Random/OSRNG/nt.pyt<module>s
	(