Viewing 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
	(
Back to Directory File Manager