• Home
  • Raw
  • Download

Lines Matching refs:hLen

333     UINT16       hLen = CryptHashGetDigestSize(hashAlg);  in OaepEncode()  local
343 if(hLen == 0) in OaepEncode()
348 if(padded->size < (2 * hLen) + 2) in OaepEncode()
352 if(message->size > (padded->size - (2 * hLen) - 2)) in OaepEncode()
357 pp = &padded->buffer[hLen + 1]; in OaepEncode()
359 hLen, pp) != hLen) in OaepEncode()
363 padLen = padded->size - message->size - (2 * hLen) - 2; in OaepEncode()
364 MemorySet(&pp[hLen], 0, padLen); in OaepEncode()
365 pp[hLen + padLen] = 0x01; in OaepEncode()
367 memcpy(&pp[hLen + padLen], message->buffer, message->size); in OaepEncode()
370 dbSize = hLen + padLen + message->size; in OaepEncode()
374 CryptRandomGenerate(hLen, mySeed); in OaepEncode()
375 DRBG_Generate(rand, mySeed, (UINT16)hLen); in OaepEncode()
379 CryptMGF_KDF(dbSize, mask, hashAlg, hLen, seed, 0); in OaepEncode()
385 pp = &padded->buffer[hLen + 1]; in OaepEncode()
388 if(CryptMGF_KDF(hLen, &padded->buffer[1], hashAlg, dbSize, pp, 0) != (unsigned)hLen) in OaepEncode()
393 for(i = hLen; i > 0; i--) in OaepEncode()
428 UINT32 hLen = CryptHashGetDigestSize(hashAlg); in OaepDecode() local
437 if((padded->size < (unsigned)((2 * hLen) + 2)) || (padded->buffer[0] != 0)) in OaepDecode()
441 CryptMGF_KDF(hLen, seedMask, hashAlg, padded->size - hLen - 1, in OaepDecode()
442 &padded->buffer[hLen + 1], 0); in OaepDecode()
445 pAssert(hLen <= sizeof(seedMask)); in OaepDecode()
448 for(i = hLen; i > 0; i--) in OaepDecode()
452 CryptMGF_KDF(padded->size - hLen - 1, mask, hashAlg, hLen, seedMask, 0); in OaepDecode()
455 pp = &padded->buffer[hLen + 1]; in OaepDecode()
457 for(i = (padded->size - hLen - 1); i > 0; i--) in OaepDecode()
463 hLen, seedMask)) != hLen) in OaepDecode()
465 if(memcmp(seedMask, mask, hLen) != 0) in OaepDecode()
469 pm = &mask[hLen]; in OaepDecode()
470 for(i = (UINT32)padded->size - (2 * hLen) - 1; i > 0; i--) in OaepDecode()
610 UINT32 hLen = CryptHashGetDigestSize(hashAlg); in PssEncode() local
619 pAssert(out != NULL && hLen > 0 && digest != NULL); in PssEncode()
622 mLen = (UINT16)(out->size - hLen - 1); in PssEncode()
625 saltSize = CryptRsaPssSaltSize((INT16)hLen, (INT16)out->size); in PssEncode()
642 CryptHashEnd(&hashState, hLen, &pOut[out->size - hLen - 1]); in PssEncode()
645 if(CryptMGF_KDF(mLen, pOut, hashAlg, hLen, &pOut[mLen], 0) != mLen) in PssEncode()
690 UINT32 hLen = CryptHashGetDigestSize(hashAlg); in PssDecode() local
706 if(hLen == 0) in PssDecode()
717 mLen = eIn->size - hLen - 1; in PssDecode()
718 CryptMGF_KDF(mLen, mask, hashAlg, hLen, &pe[mLen], 0); in PssDecode()
769 fail |= (CryptHashEnd(&hashState, hLen, mask) != hLen); in PssDecode()
772 for(pm = mask; hLen > 0; hLen--) in PssDecode()