• Home
  • Raw
  • Download

Lines Matching refs:hashState

317     PHASH_STATE      hashState,     // IN: the hash state  in HashEnd()  argument
323 if((hashState->hashAlg == TPM_ALG_NULL) in HashEnd()
324 || (hashState->type != HASH_STATE_HASH)) in HashEnd()
328 hashState->def = CryptGetHashDef(hashState->hashAlg); in HashEnd()
330 dOutSize = MIN(dOutSize, hashState->def->digestSize); in HashEnd()
332 HASH_END(hashState, temp); in HashEnd()
338 hashState->type = HASH_STATE_EMPTY; in HashEnd()
359 PHASH_STATE hashState, // OUT: the running hash state in CryptHashStart() argument
367 hashState->hashAlg = hashAlg; in CryptHashStart()
374 hashState->def = CryptGetHashDef(hashAlg); in CryptHashStart()
375 HASH_START(hashState); in CryptHashStart()
376 retVal = hashState->def->digestSize; in CryptHashStart()
379 hashState->type = HASH_STATE_HASH; in CryptHashStart()
388 PHASH_STATE hashState, // IN: the hash context information in CryptDigestUpdate() argument
393 if(hashState->hashAlg != TPM_ALG_NULL) in CryptDigestUpdate()
395 if((hashState->type == HASH_STATE_HASH) in CryptDigestUpdate()
396 || (hashState->type == HASH_STATE_HMAC)) in CryptDigestUpdate()
397 HASH_DATA(hashState, dataSize, (BYTE *)data); in CryptDigestUpdate()
399 else if(hashState->type == HASH_STATE_SMAC) in CryptDigestUpdate()
400 (hashState->state.smac.smacMethods.data)(&hashState->state.smac.state, in CryptDigestUpdate()
419 PHASH_STATE hashState, // IN: the state of hash stack in CryptHashEnd() argument
424 pAssert(hashState->type == HASH_STATE_HASH); in CryptHashEnd()
425 return HashEnd(hashState, dOutSize, dOut); in CryptHashEnd()
567 state->hashState.hashAlg = hashAlg; in CryptHmacStart()
569 state->hashState.type = HASH_STATE_HMAC; in CryptHmacStart()
589 PHASH_STATE hState = (PHASH_STATE)&state->hashState; in CryptHmacEnd()
593 return (state->hashState.state.smac.smacMethods.end) in CryptHmacEnd()
594 (&state->hashState.state.smac.state, in CryptHmacEnd()
678 HASH_STATE hashState; in CryptMGF_KDF() local
692 CryptHashStart(&hashState, hashAlg); in CryptMGF_KDF()
693 CryptDigestUpdate(&hashState, seedSize, seed); in CryptMGF_KDF()
694 CryptDigestUpdateInt(&hashState, 4, counter); in CryptMGF_KDF()
696 CryptHashEnd(&hashState, MIN((mSize - bytes), hLen), in CryptMGF_KDF()
778 CryptDigestUpdateInt(&hState.hashState, 4, counter); in CryptKDFa()
782 HASH_DATA(&hState.hashState, label->size, (BYTE *)label->buffer); in CryptKDFa()
791 CryptDigestUpdateInt(&hState.hashState, 1, 0); in CryptKDFa()
794 HASH_DATA(&hState.hashState, contextU->size, contextU->buffer); in CryptKDFa()
797 HASH_DATA(&hState.hashState, contextV->size, contextV->buffer); in CryptKDFa()
799 CryptDigestUpdateInt(&hState.hashState, 4, sizeInBits); in CryptKDFa()
837 HASH_STATE hashState; in CryptKDFe() local
871 CryptHashStart(&hashState, hashAlg); in CryptKDFe()
873 CryptDigestUpdateInt(&hashState, 4, counter); in CryptKDFe()
877 CryptDigestUpdate2B(&hashState, Z); in CryptKDFe()
880 CryptDigestUpdate2B(&hashState, label); in CryptKDFe()
889 CryptDigestUpdateInt(&hashState, 1, 0); in CryptKDFe()
892 CryptDigestUpdate2B(&hashState, partyUInfo); in CryptKDFe()
896 CryptDigestUpdate2B(&hashState, partyVInfo); in CryptKDFe()
900 CryptHashEnd(&hashState, hLen, stream); in CryptKDFe()