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