[cfe-dev] [libcxx] random_device for Windows needs more storage
Yaron Keren
yaron.keren at gmail.com
Mon Oct 7 14:31:46 PDT 2013
Nick, I have seen RtlGenRandom, but I didn't initally use it since
Microsoft is recommending to use CryptGenRandom instead:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa387694(v=vs.85).aspx
[The *RtlGenRandom* function is available for use in the operating systems
specified in the Requirements section. It may be altered or unavailable in
subsequent versions. Instead, use the
*CryptGenRandom*<http://msdn.microsoft.com/en-us/library/windows/desktop/aa379942(v=vs.85).aspx>
function.]
Due to backward compatibility it's very low chance RtlGenRandom will
actually go away, I'll use it.
Yaron
2013/10/7 Nico Rieck <nico.rieck at gmail.com>
> On 07.10.2013 20:57, Yaron Keren wrote:
>
>> I'm trying to implement random_device for Windows using the CryptGenRandom
>> API, as in the attached non-working code.
>>
>
> There's no need for CryptGenRandom and its overhead here. RtlGenRandom is
> just fine for random_device. MSVCRT does the same.
>
> -Nico
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131008/31134d94/attachment.html>
More information about the cfe-dev
mailing list