Lines Matching refs:hLen
349 INT32 hLen = _cpri__GetDigestSize(hashAlg); in OaepEncode() local
358 if(hLen <= 0) in OaepEncode()
366 if(messageSize > paddedSize - 2 * hLen - 2) in OaepEncode()
370 pp = &padded[hLen + 1]; in OaepEncode()
371 retVal = _cpri__HashBlock(hashAlg, lSize, (BYTE *)label, hLen, pp); in OaepEncode()
373 padLen = paddedSize - messageSize - (2 * hLen) - 2; in OaepEncode()
374 memset(&pp[hLen], 0, padLen); in OaepEncode()
375 pp[hLen+padLen] = 0x01; in OaepEncode()
377 memcpy(&pp[hLen+padLen], message, messageSize); in OaepEncode()
379 dbSize = hLen+padLen+messageSize; in OaepEncode()
387 _cpri__GenerateRandom(hLen, mySeed); in OaepEncode()
389 if((retVal = _cpri__MGF1(dbSize, mask, hashAlg, hLen, seed)) < 0) in OaepEncode()
396 pp = &padded[hLen + 1]; in OaepEncode()
398 if((retVal = _cpri__MGF1(hLen, &padded[1], hashAlg, dbSize, pp)) < 0) in OaepEncode()
404 for(i = hLen; i > 0; i--) in OaepEncode()
438 INT32 hLen = _cpri__GetDigestSize(hashAlg); in OaepDecode() local
445 pAssert(hLen > 0 && dataOutSize != NULL && dataOut != NULL && padded != NULL); in OaepDecode()
455 if(paddedSize < (unsigned)((2 * hLen) + 2) || *padded != 0) in OaepDecode()
459 if((retVal = _cpri__MGF1(hLen, seedMask, hashAlg, in OaepDecode()
460 paddedSize-hLen-1, &padded[hLen+1])) < 0) in OaepDecode()
465 for(i = hLen; i > 0; i--) in OaepDecode()
468 if((retVal = _cpri__MGF1(paddedSize-hLen-1, mask, hashAlg, in OaepDecode()
469 hLen, seedMask)) < 0) in OaepDecode()
472 pp = &padded[hLen+1]; in OaepDecode()
474 for(i = paddedSize-hLen-1; i > 0; i--) in OaepDecode()
478 if((retVal=_cpri__HashBlock(hashAlg, lSize,(BYTE *)label, hLen, seedMask)) < 0) in OaepDecode()
480 if(memcmp(seedMask, mask, hLen) != 0) in OaepDecode()
483 pm = &mask[hLen]; in OaepDecode()
484 for(i = paddedSize-(2*hLen)-1; i > 0; i--) in OaepDecode()
614 INT32 hLen = _cpri__GetDigestSize(hashAlg); in PssEncode() local
622 pAssert(eOut != NULL && hLen > 0 && hashIn != NULL ); in PssEncode()
624 mLen = (UINT16)(eOutSize - hLen - 1); in PssEncode()
628 if(saltSize > hLen) in PssEncode()
629 saltSize = (UINT16)hLen; in PssEncode()
637 saltSize = hLen; in PssEncode()
638 memcpy(salt, saltIn, hLen); in PssEncode()
648 _cpri__CompleteHash(&hashState, hLen, &eOut[eOutSize - hLen - 1]); in PssEncode()
650 if((retVal = _cpri__MGF1(mLen, eOut, hashAlg, hLen, &eOut[mLen])) < 0) in PssEncode()
699 INT32 hLen = _cpri__GetDigestSize(hashAlg); in PssDecode() local
711 if(hLen == 0) in PssDecode()
719 mLen = eInSize - hLen - 1; in PssDecode()
720 if((retVal = _cpri__MGF1(mLen, mask, hashAlg, hLen, &eIn[mLen])) < 0) in PssDecode()
769 fail |= (retVal != hLen); in PssDecode()
770 fail |= (memcmp(mask, eIn, hLen) != 0); in PssDecode()