Home
last modified time | relevance | path

Searched refs:hashState (Results 1 – 8 of 8) sorted by relevance

/hal_infineon-3.6.0/mtb-pdl-cat1/drivers/source/
Dcy_crypto_core_sha_v2.c70 cy_stc_crypto_sha_state_t *hashState, in Cy_Crypto_Core_V2_Sha_Init() argument
162 CY_ASSERT_L1((shaBuffers != NULL) && (hashState != NULL)); in Cy_Crypto_Core_V2_Sha_Init()
168hashState->block = (uint8_t*)((cy_stc_crypto_v2_sha1_buffers_t*)shaBuffers)->block; in Cy_Crypto_Core_V2_Sha_Init()
169hashState->hash = (uint8_t*)((cy_stc_crypto_v2_sha1_buffers_t*)shaBuffers)->hash; in Cy_Crypto_Core_V2_Sha_Init()
171 hashState->mode = (uint32_t)mode; in Cy_Crypto_Core_V2_Sha_Init()
172 hashState->modeHw = (uint32_t)CY_CRYPTO_V2_SHA1_OPC; in Cy_Crypto_Core_V2_Sha_Init()
173 hashState->initialHash = (const uint8_t*)sha1InitHash; in Cy_Crypto_Core_V2_Sha_Init()
174 hashState->blockSize = CY_CRYPTO_SHA1_BLOCK_SIZE; in Cy_Crypto_Core_V2_Sha_Init()
175 hashState->hashSize = CY_CRYPTO_SHA1_HASH_SIZE; in Cy_Crypto_Core_V2_Sha_Init()
176 hashState->digestSize = CY_CRYPTO_SHA1_DIGEST_SIZE; in Cy_Crypto_Core_V2_Sha_Init()
[all …]
Dcy_crypto_core_sha_v1.c80 cy_stc_crypto_sha_state_t *hashState, uint8_t const *block) in Cy_Crypto_Core_V1_Sha_ProcessBlock() argument
84 … REG_CRYPTO_SHA_CTL(base) = (uint32_t)(_VAL2FLD(CRYPTO_SHA_CTL_MODE, (uint32_t)hashState->modeHw)); in Cy_Crypto_Core_V1_Sha_ProcessBlock()
88 (uint32_t)hashState->hash, /* Initial hash */ in Cy_Crypto_Core_V1_Sha_ProcessBlock()
89 (uint32_t)hashState->roundMem, in Cy_Crypto_Core_V1_Sha_ProcessBlock()
90 (uint32_t)hashState->hash); /* Digest */ in Cy_Crypto_Core_V1_Sha_ProcessBlock()
130 cy_stc_crypto_sha_state_t *hashState, in Cy_Crypto_Core_V1_Sha_Init() argument
195 CY_ASSERT_L1((shaBuffers != NULL) && (hashState != NULL)); in Cy_Crypto_Core_V1_Sha_Init()
201hashState->block = (uint8_t*)((cy_stc_crypto_v1_sha1_buffers_t*)shaBuffers)->block; in Cy_Crypto_Core_V1_Sha_Init()
202hashState->hash = (uint8_t*)((cy_stc_crypto_v1_sha1_buffers_t*)shaBuffers)->hash; in Cy_Crypto_Core_V1_Sha_Init()
203hashState->roundMem = (uint8_t*)((cy_stc_crypto_v1_sha1_buffers_t*)shaBuffers)->roundMem; in Cy_Crypto_Core_V1_Sha_Init()
[all …]
Dcy_crypto_core_hmac_v1.c77 cy_stc_crypto_sha_state_t *hashState,
156 cy_stc_crypto_sha_state_t *hashState, in Cy_Crypto_Core_V1_Hmac_Calculate() argument
171 if (keyLength > hashState->blockSize) in Cy_Crypto_Core_V1_Hmac_Calculate()
174 tmpResult = Cy_Crypto_Core_V1_Sha_Start(base, hashState); in Cy_Crypto_Core_V1_Hmac_Calculate()
177 tmpResult = Cy_Crypto_Core_V1_Sha_Update(base, hashState, key, keyLength); in Cy_Crypto_Core_V1_Hmac_Calculate()
181 tmpResult = Cy_Crypto_Core_V1_Sha_Finish(base, hashState, (uint8_t*)m0KeyPtrTmp); in Cy_Crypto_Core_V1_Hmac_Calculate()
187 Cy_Crypto_Core_V1_MemSet(base, (m0KeyPtrTmp + hashState->digestSize), 0x00u, in Cy_Crypto_Core_V1_Hmac_Calculate()
188 (uint16_t)(hashState->blockSize - hashState->digestSize)); in Cy_Crypto_Core_V1_Hmac_Calculate()
191 else if (keyLength < hashState->blockSize) in Cy_Crypto_Core_V1_Hmac_Calculate()
195 …Cy_Crypto_Core_V1_MemSet(base, (m0KeyPtrTmp + keyLength), 0x00u, (uint16_t)(hashState->blockSize -… in Cy_Crypto_Core_V1_Hmac_Calculate()
[all …]
Dcy_crypto_core_hmac_v2.c89 return Cy_Crypto_Core_V2_Sha_Init(base, &hmacState->hashState, mode, hmacState->sha_buffer); in Cy_Crypto_Core_V2_Hmac_Init()
142 blockSizeTmp = hmacState->hashState.blockSize; in Cy_Crypto_Core_V2_Hmac_Start()
143 digestSizeTmp = hmacState->hashState.digestSize; in Cy_Crypto_Core_V2_Hmac_Start()
159 status = Cy_Crypto_Core_V2_Sha_Start (base, &hmacState->hashState); in Cy_Crypto_Core_V2_Hmac_Start()
163 status = Cy_Crypto_Core_V2_Sha_Update (base, &hmacState->hashState, key, keyLength); in Cy_Crypto_Core_V2_Hmac_Start()
167 status = Cy_Crypto_Core_V2_Sha_Finish (base, &hmacState->hashState, m0KeyPtrTmp); in Cy_Crypto_Core_V2_Hmac_Start()
198 status = Cy_Crypto_Core_V2_Sha_Start (base, &hmacState->hashState); in Cy_Crypto_Core_V2_Hmac_Start()
202 … status = Cy_Crypto_Core_V2_Sha_Update(base, &hmacState->hashState, ipadPtrTmp, blockSizeTmp); in Cy_Crypto_Core_V2_Hmac_Start()
253 return Cy_Crypto_Core_V2_Sha_Update(base, &hmacState->hashState, message, messageSize); in Cy_Crypto_Core_V2_Hmac_Update()
296 blockSizeTmp = hmacState->hashState.blockSize; in Cy_Crypto_Core_V2_Hmac_Finish()
[all …]
/hal_infineon-3.6.0/mtb-pdl-cat1/drivers/include/
Dcy_crypto_core_sha.h173 …n_crypto_status_t Cy_Crypto_Core_Sha_Start(CRYPTO_Type *base, cy_stc_crypto_sha_state_t *hashState) in Cy_Crypto_Core_Sha_Start() argument
180 tmpResult = Cy_Crypto_Core_V1_Sha_Start(base, hashState); in Cy_Crypto_Core_Sha_Start()
186 tmpResult = Cy_Crypto_Core_V2_Sha_Start(base, hashState); in Cy_Crypto_Core_Sha_Start()
221 cy_stc_crypto_sha_state_t *hashState, in Cy_Crypto_Core_Sha_Update() argument
230 tmpResult = Cy_Crypto_Core_V1_Sha_Update(base, hashState, message, messageSize); in Cy_Crypto_Core_Sha_Update()
236 tmpResult = Cy_Crypto_Core_V2_Sha_Update(base, hashState, message, messageSize); in Cy_Crypto_Core_Sha_Update()
263 cy_stc_crypto_sha_state_t *hashState, in Cy_Crypto_Core_Sha_Finish() argument
271 tmpResult = Cy_Crypto_Core_V1_Sha_Finish(base, hashState, digest); in Cy_Crypto_Core_Sha_Finish()
277 tmpResult = Cy_Crypto_Core_V2_Sha_Finish(base, hashState, digest); in Cy_Crypto_Core_Sha_Finish()
300 …en_crypto_status_t Cy_Crypto_Core_Sha_Free(CRYPTO_Type *base, cy_stc_crypto_sha_state_t *hashState) in Cy_Crypto_Core_Sha_Free() argument
[all …]
Dcy_crypto_core_sha_v1.h99 cy_stc_crypto_sha_state_t *hashState,
103 cy_stc_crypto_sha_state_t *hashState,
108 cy_stc_crypto_sha_state_t *hashState);
111 cy_stc_crypto_sha_state_t *hashState,
116 cy_stc_crypto_sha_state_t *hashState,
120 cy_stc_crypto_sha_state_t *hashState);
Dcy_crypto_core_sha_v2.h93 cy_stc_crypto_sha_state_t *hashState,
97 …ypto_status_t Cy_Crypto_Core_V2_Sha_Start(CRYPTO_Type *base, cy_stc_crypto_sha_state_t *hashState);
100 cy_stc_crypto_sha_state_t *hashState,
105 cy_stc_crypto_sha_state_t *hashState,
108 …rypto_status_t Cy_Crypto_Core_V2_Sha_Free(CRYPTO_Type *base, cy_stc_crypto_sha_state_t *hashState);
Dcy_crypto_common.h821 cy_stc_crypto_sha_state_t hashState; member