C language function:CryptGenRandom sample codes

Search sample code in the internet.It is the result.


TITLE : Diligence is the Mother of Good Locky Detection | Fortinet Blog
As with its encoding format, it uses the API CryptGenRandom(), that will be called in function genRandom_4bytes as shown in Figure 5 and Figure 6, which generates random value to be used as length of random character, length of chunk data to be encoded, and the random characters. Figure 5 also shows the complete data encoding function, as of Figure 6 shows its custom random character generator function used in front of its encoding format........
http://blog.fortinet.com/2016/06/01/diligence-is-the-mother-of-good-locky-detection


TITLE : ActionScript | Christian Cantrell
Windows CryptGenRandom().......
http://blogs.adobe.com/cantrell/archives/category/actionscript
TITLE : Bug #9569: SecureRandom should try /dev/urandom first - Ruby trunk - Ruby Issue Tracking System
- CryptGenRandom().......
http://bugs.ruby-lang.org/issues/9569
TITLE : Bug #9569: SecureRandom should try /dev/urandom first - Ruby trunk - Ruby Issue Tracking System
Ruby has been avoiding /dev/urandom if possible. Ruby trunk works as Delan Azabani wrote in #9569-29, with one addition: as of a few days ago, fill_random_bytes_syscall() now tries arc4random_buf() first. So SecureRandom tries in order RAND_bytes(), arc4random_buf(), CryptGenRandom(), getrandom() before /dev/urandom........
http://bugs.ruby-lang.org/issues/9569
TITLE : Bug #9569: SecureRandom should try /dev/urandom first - Ruby trunk - Ruby Issue Tracking System
- CryptGenRandom().......
http://bugs.ruby-lang.org/issues/9569
TITLE : Cap'n Proto: News
* On Windows, the capnp tool would crash when it tried to generate an ID, e.g. when using capnp id or when compiling a file that was missing the file ID, because it tried to get random bytes from /dev/urandom, which of course doesnft exist on Windows. Oops. Now it uses CryptGenRandom()........
http://capnproto.org/news/
TITLE : Coding rules - Cryptography Coding Standard
if(!CryptGenRandom(handle, len, out)) {.......
http://cryptocoding.net/index.php/Coding_rules
search Google

https://www.google.com/#q=CryptGenRandom