Home | History | Annotate | Download | only in crypto

Lines Matching refs:ok

82   BOOL ok =
89 if (!ok)
113 BOOL ok = CryptAcquireContext(safe_provider.receive(), NULL, NULL,
115 if (!ok)
124 ok = CryptGenKey(safe_provider.get(), alg, CRYPT_EXPORTABLE,
126 if (!ok)
182 BOOL ok = CryptAcquireContext(safe_provider.receive(), NULL, NULL,
184 if (!ok)
189 ok = CryptGenRandom(safe_provider, key_size_in_bytes, random.get());
190 if (!ok)
215 BOOL ok = CryptCreateHash(provider, CALG_HMAC, key, 0, safe_hash.receive());
216 if (!ok)
223 ok = CryptSetHashParam(safe_hash, HP_HMAC_INFO,
225 if (!ok)
255 BOOL ok = CryptDuplicateHash(hash, NULL, 0, safe_hash.receive());
256 if (!ok)
260 ok = CryptHashData(safe_hash, reinterpret_cast<const BYTE*>(salt.data()),
262 if (!ok)
267 ok = CryptHashData(safe_hash,
274 ok = CryptGetHashParam(safe_hash, HP_HASHVAL, &hash_value[0], &size, 0);
275 if (!ok || size != hash_size)
285 ok = CryptDuplicateHash(hash, NULL, 0, safe_hash.receive());
286 if (!ok)
289 ok = CryptHashData(safe_hash, &hash_value[0], hash_size, 0);
290 if (!ok)
294 ok = CryptGetHashParam(safe_hash, HP_HASHVAL, &hash_value[0], &size, 0);
295 if (!ok || size != hash_size)
322 bool ok = false;
327 ok = GenerateAESKey(key_size_in_bits, &provider, &key);
330 ok = GenerateHMACKey(key_size_in_bits, CALG_SHA1, &provider,
335 if (!ok) {
385 BOOL ok = CryptAcquireContext(provider.receive(), NULL, NULL, provider_type,
387 if (!ok)
408 ok = CryptGetHashParam(prf, HP_HASHSIZE,
410 if (!ok || hLen == 0)
485 BOOL ok = CryptAcquireContext(provider.receive(), NULL, NULL, provider_type,
487 if (!ok)
506 BOOL ok = CryptExportKey(key_, 0, PLAINTEXTKEYBLOB, 0, NULL, &size);
507 if (!ok)
512 ok = CryptExportKey(key_, 0, PLAINTEXTKEYBLOB, 0, &result[0], &size);
513 if (!ok)