|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /proc/self/root/opt/alt-old/python27/lib64/python2.7/site-packages/Crypto/Random/OSRNG/ |
Upload File : |
�
Bd\Rc @ sN d Z d g Z d d l Z d d l m Z d e f d � � YZ d � Z d S( s $Id$t
WindowsRNGi����N( t BaseRNGc B s2 e Z d Z d � Z d � Z d � Z d � Z RS( s <CryptGenRandom>c C s t j � | _ t j | � d S( N( t winrandomt newt _WindowsRNG__winrandR t __init__( t self( ( sI /opt/alt/python27/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyR # s c C sS | j r t d � � n | j j d � } t | � d k sB t � t j | � d S( 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
s I/O operation on closed filei� i Ni i ( t closedt
ValueErrorR t get_bytest lent AssertionErrorR t flush( R t data( ( sI /opt/alt/python27/lib64/python2.7/site-packages/Crypto/Random/OSRNG/nt.pyR '