'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'

def flush(self):

    if self.closed:
        raise ValueError('I/O    operation    on    closed    file')
    data = self.__winrand.get_bytes((128 * 1024))
    assert (len(data) == (128 * 1024))
    BaseRNG.flush(self)
