You can simply read from /dev/urandom/
to get pseudo-random bytes. If you need this for cryptographic purposes, you may want to look into OpenSSL as well.
Thread-safe RNG Android NDK
-
07-12-2021 - |
Question
Is there a thread-safe RNG in Bionic? For Linux, I know there is rand_r()
, but this is unfortunately not a part of the NDK.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow