rand
作者:互联网
#include <wincrypt.h>
void f(){
HCRYPTPROV hProv = 0;
// Get a handle to the default PROV_RSA_FULL provider.
if(!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
printf("Error %x during CryptAcquireContext!\n", GetLastError());
return;
}
if(!CryptGenRandom(hProv, 8, pbData))
//CryptGenRandom(hProv, len, b)
}
标签:hProv,rand,CryptAcquireContext,FULL,CRYPT,CryptGenRandom,NULL 来源: https://www.cnblogs.com/Janly/p/13984755.html