Merge pull request #91 from minrk/backport-winrandom-backwards

backport winrandom fix
This commit is contained in:
Pieter Hintjens 2016-01-18 15:53:16 +01:00
commit b7a30978ca

View File

@ -22,7 +22,7 @@ void randombytes(unsigned char *x,unsigned long long xlen)
if (xlen < 1048576) i = (unsigned) xlen; else i = 1048576; if (xlen < 1048576) i = (unsigned) xlen; else i = 1048576;
ret = CryptGenRandom(hProvider, i, x); ret = CryptGenRandom(hProvider, i, x);
if (ret != FALSE) { if (ret == FALSE) {
Sleep(1); Sleep(1);
continue; continue;
} }