...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <Windows.h> #include <wincrypt.h> #include <stdio.h> HCRYPTPROV prov; if (CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET0)) { long int li = 0; if (CryptGenRandom(prov, sizeof(li), (BYTE *)&li)) printf("Random number: %ld\n", li); CryptReleaseContext(prov, 0); } |
...