Home | History | Annotate | Download | only in crypto

Lines Matching refs:ok

85   BOOL ok =
92 if (!ok)
116 BOOL ok = CryptAcquireContext(safe_provider.receive(), NULL, NULL,
118 if (!ok)
127 ok = CryptGenKey(safe_provider.get(), alg, CRYPT_EXPORTABLE,
129 if (!ok)
185 BOOL ok = CryptAcquireContext(safe_provider.receive(), NULL, NULL,
187 if (!ok)
192 ok = CryptGenRandom(safe_provider, key_size_in_bytes, random.get());
193 if (!ok)
218 BOOL ok = CryptCreateHash(provider, CALG_HMAC, key, 0, safe_hash.receive());
219 if (!ok)
226 ok = CryptSetHashParam(safe_hash, HP_HMAC_INFO,
228 if (!ok)
258 BOOL ok = CryptDuplicateHash(hash, NULL, 0, safe_hash.receive());
259 if (!ok)
263 ok = CryptHashData(safe_hash, reinterpret_cast<const BYTE*>(salt.data()),
265 if (!ok)
270 ok = CryptHashData(safe_hash,
277 ok = CryptGetHashParam(safe_hash, HP_HASHVAL, &hash_value[0], &size, 0);
278 if (!ok || size != hash_size)
288 ok = CryptDuplicateHash(hash, NULL, 0, safe_hash.receive());
289 if (!ok)
292 ok = CryptHashData(safe_hash, &hash_value[0], hash_size, 0);
293 if (!ok)
297 ok = CryptGetHashParam(safe_hash, HP_HASHVAL, &hash_value[0], &size, 0);
298 if (!ok || size != hash_size)
325 bool ok = false;
330 ok = GenerateAESKey(key_size_in_bits, &provider, &key);
333 ok = GenerateHMACKey(key_size_in_bits, CALG_SHA1, &provider,
338 if (!ok) {
388 BOOL ok = CryptAcquireContext(provider.receive(), NULL, NULL, provider_type,
390 if (!ok)
411 ok = CryptGetHashParam(prf, HP_HASHSIZE,
413 if (!ok || hLen == 0)
488 BOOL ok = CryptAcquireContext(provider.receive(), NULL, NULL, provider_type,
490 if (!ok)
509 BOOL ok = CryptExportKey(key_, 0, PLAINTEXTKEYBLOB, 0, NULL, &size);
510 if (!ok)
515 ok = CryptExportKey(key_, 0, PLAINTEXTKEYBLOB, 0, &result[0], &size);
516 if (!ok)