Home
last modified time | relevance | path

Searched refs:hCryptProv (Results 1 – 7 of 7) sorted by relevance

/external/python/cpython3/Python/
Dbootstrap_hash.c35 static HCRYPTPROV hCryptProv = 0; variable
41 if (!CryptAcquireContext(&hCryptProv, NULL, NULL, in win32_urandom_init()
59 if (hCryptProv == 0) in win32_urandom()
69 if (!CryptGenRandom(hCryptProv, chunk, buffer)) in win32_urandom()
594 if (hCryptProv) { in _Py_HashRandomization_Fini()
595 CryptReleaseContext(hCryptProv, 0); in _Py_HashRandomization_Fini()
596 hCryptProv = 0; in _Py_HashRandomization_Fini()
/external/python/cpython2/Python/
Drandom.c27 static HCRYPTPROV hCryptProv = 0; variable
53 if (! pCryptAcquireContext(&hCryptProv, NULL, NULL, in win32_urandom_init()
74 if (hCryptProv == 0) in win32_urandom()
83 if (!pCryptGenRandom(hCryptProv, chunk, buffer)) in win32_urandom()
425 if (hCryptProv) { in _PyRandom_Fini()
426 CryptReleaseContext(hCryptProv, 0); in _PyRandom_Fini()
427 hCryptProv = 0; in _PyRandom_Fini()
/external/python/cryptography/src/_cffi_src/openssl/src/
Dosrandom_engine.c27 static HCRYPTPROV hCryptProv = 0; variable
30 if (hCryptProv != 0) { in osrandom_init()
33 if (CryptAcquireContext(&hCryptProv, NULL, NULL, in osrandom_init()
47 if (hCryptProv == 0) { in osrandom_rand_bytes()
51 if (!CryptGenRandom(hCryptProv, (DWORD)size, buffer)) { in osrandom_rand_bytes()
63 if (CryptReleaseContext(hCryptProv, 0)) { in osrandom_finish()
64 hCryptProv = 0; in osrandom_finish()
77 return hCryptProv != 0; in osrandom_rand_status()
/external/curl/src/
Dtool_metalink.c82 HCRYPTPROV hCryptProv; member
396 if(ctx->hCryptProv) in win32_crypto_final()
397 CryptReleaseContext(ctx->hCryptProv, 0); in win32_crypto_final()
402 if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, in MD5_Init()
404 CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash); in MD5_Init()
423 if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, in SHA1_Init()
425 CryptCreateHash(ctx->hCryptProv, CALG_SHA1, 0, 0, &ctx->hHash); in SHA1_Init()
444 if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, in SHA256_Init()
446 CryptCreateHash(ctx->hCryptProv, CALG_SHA_256, 0, 0, &ctx->hHash); in SHA256_Init()
/external/curl/lib/
Dmd4.c142 HCRYPTPROV hCryptProv; member
148 ctx->hCryptProv = 0; in MD4_Init()
151 if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_FULL, in MD4_Init()
153 CryptCreateHash(ctx->hCryptProv, CALG_MD4, 0, 0, &ctx->hHash); in MD4_Init()
173 if(ctx->hCryptProv) in MD4_Final()
174 CryptReleaseContext(ctx->hCryptProv, 0); in MD4_Final()
Dmd5.c135 HCRYPTPROV hCryptProv; member
141 if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, in MD5_Init()
143 CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash); in MD5_Init()
162 if(ctx->hCryptProv) in MD5_Final()
163 CryptReleaseContext(ctx->hCryptProv, 0); in MD5_Final()
/external/curl/lib/vtls/
Dschannel.c2117 HCRYPTPROV hCryptProv = 0; in Curl_schannel_random() local
2121 if(!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, in Curl_schannel_random()
2125 if(!CryptGenRandom(hCryptProv, (DWORD)length, entropy)) { in Curl_schannel_random()
2126 CryptReleaseContext(hCryptProv, 0UL); in Curl_schannel_random()
2130 CryptReleaseContext(hCryptProv, 0UL); in Curl_schannel_random()