Home | History | Annotate | Download | only in nss

Lines Matching full:hash

26     const SECHashObject *hash;
30 hash = HASH_GetHashObject(hashAlg);
31 if (hash == NULL)
34 hashContext = (*hash->create)();
35 rounds = (maskLen + hash->length - 1) / hash->length;
44 (*hash->begin)(hashContext);
45 (*hash->update)(hashContext, mgfSeed, mgfSeedLen);
46 (*hash->update)(hashContext, C, sizeof C);
48 tempHash = mask + counter * hash->length;
50 (*hash->end)(hashContext, tempHash, &digestLen, hash->length);
51 } else { /* we're in the last round and need to cut the hash */
52 temp = (unsigned char *)PORT_Alloc(hash->length);
53 (*hash->end)(hashContext, temp, &digestLen, hash->length);
54 PORT_Memcpy(tempHash, temp, maskLen - counter * hash->length);
58 (*hash->destroy)(hashContext, PR_TRUE);
78 const SECHashObject *hash;
85 hash = HASH_GetHashObject(hashAlg);
86 dbMaskLen = emLen - hash->length - 1;
89 if ((emLen < (hash->length + sLen + 2)) ||
103 MGF1(maskHashAlg, db, dbMaskLen, &em[dbMaskLen], hash->length);
128 H_ = (unsigned char *)PORT_Alloc(hash->length);
134 hash_context = (*hash->create)();
141 (*hash->begin)(hash_context);
142 (*hash->update)(hash_context, eightZeros, 8);
143 (*hash->update)(hash_context, mHash, hash->length);
144 (*hash->update)(hash_context, &db[dbMaskLen - sLen], sLen);
145 (*hash->end)(hash_context, H_, &i, hash->length);
146 (*hash->destroy)(hash_context, PR_TRUE);
151 if (PORT_Memcmp(H_, &em[dbMaskLen], hash->length) != 0) {