Random numbers for Windows Phone 8 and Windows Store 8?
Asked Answered
E

1

0

I'm struggling with a port of a couple of security libraries to the Windows Phone 8 and Windows Store 8 platform. I need a function which provides random numbers.

Win32 has CryptGenRandom and even RtlGenRandom. Windows Store 10 and Universal Windows has BCryptGenRandom. However, there's a hole for Windows Phone 8 and Windows Store 8 because CryptoAPI is not available, and CNG is only available on Windows 10 and Universal Windows. The MSDN docs say BCryptGenRandom is available for "Windows Store", but they don't say its Windows Store 10 and UWP (thanks CW).

The libraries are unmanaged C/C++. They are written in standard/portable C and C++. On occasion, they have to use a OS specific API like those for gathering random number. They don't compile against managed APIs, and they don't link to managed libraries.

What do we use for random numbers for Windows Phone 8 and Windows Store 8?

Echoism answered 2/5, 2016 at 3:24 Comment(0)
E
1

In WP8.1 and Windows 8+ we are using CryptographicBuffer.GenerateRandomNumber

Elman answered 5/5, 2016 at 9:0 Comment(1)
OP is asking for Win 8.0 phone?Anandrous

© 2022 - 2024 — McMap. All rights reserved.