/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/sha/ |
D | fsl_sha.c | 220 static status_t sha_check_context(sha_ctx_internal_t *ctxInternal, const uint8_t *message) in sha_check_context() argument 222 …if ((NULL == message) || (NULL == ctxInternal) || (kStatus_Success != sha_check_input_alg(ctxInter… in sha_check_context() 237 static void sha_engine_init(SHA_Type *base, sha_ctx_internal_t *ctxInternal) in sha_engine_init() argument 241 if (kSHA_Sha1 == ctxInternal->algo) in sha_engine_init() 303 sha_ctx_internal_t *ctxInternal, in sha_process_message_data() argument 308 if (ctxInternal->blksz != 0U) in sha_process_message_data() 310 size_t toCopy = SHA_BLOCK_SIZE - ctxInternal->blksz; in sha_process_message_data() 311 (void)sha_memcpy(&ctxInternal->blk.b[ctxInternal->blksz], message, toCopy); in sha_process_message_data() 316 sha_one_block(base, &ctxInternal->blk.b[0]); in sha_process_message_data() 328 (void)sha_memcpy(&ctxInternal->blk.b[0], message, messageSize); in sha_process_message_data() [all …]
|
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/dcp/ |
D | fsl_dcp.c | 943 static status_t dcp_hash_check_context(dcp_hash_ctx_internal_t *ctxInternal, const uint8_t *message) in dcp_hash_check_context() argument 945 …if ((NULL == message) || (NULL == ctxInternal) || (kStatus_Success != dcp_hash_check_input_alg(ctx… in dcp_hash_check_context() 961 static status_t dcp_hash_engine_init(DCP_Type *base, dcp_hash_ctx_internal_t *ctxInternal) in dcp_hash_engine_init() argument 967 …if ((kDCP_Sha256 == ctxInternal->algo) || (kDCP_Sha1 == ctxInternal->algo) || (kDCP_Crc32 == ctxIn… in dcp_hash_engine_init() 969 ctxInternal->ctrl0 = (uint32_t)kDCP_CONTROL0_HASH_INIT; in dcp_hash_engine_init() 977 …DCP_Type *base, dcp_hash_ctx_internal_t *ctxInternal, dcp_work_packet_t *dcpPacket, const uint8_t … in dcp_hash_update_non_blocking() argument 979 dcpPacket->control0 = ctxInternal->ctrl0 | (ctxInternal->handle->swapConfig & 0xFC0000u) | in dcp_hash_update_non_blocking() 981 if (ctxInternal->algo == kDCP_Sha256) in dcp_hash_update_non_blocking() 985 else if (ctxInternal->algo == kDCP_Sha1) in dcp_hash_update_non_blocking() 989 else if (ctxInternal->algo == kDCP_Crc32) in dcp_hash_update_non_blocking() [all …]
|
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/hashcrypt/ |
D | fsl_hashcrypt.c | 640 …atus_t hashcrypt_sha_check_context(HASHCRYPT_Type *base, hashcrypt_sha_ctx_internal_t *ctxInternal) in hashcrypt_sha_check_context() argument 642 …if ((NULL == ctxInternal) || (kStatus_Success != hashcrypt_sha_check_input_alg(base, ctxInternal->… in hashcrypt_sha_check_context() 696 hashcrypt_sha_ctx_internal_t *ctxInternal, in hashcrypt_sha_process_message_data() argument 703 if (ctxInternal->blksz != 0U) in hashcrypt_sha_process_message_data() 705 size_t toCopy = SHA_BLOCK_SIZE - ctxInternal->blksz; in hashcrypt_sha_process_message_data() 706 (void)hashcrypt_memcpy(&ctxInternal->blk.b[ctxInternal->blksz], message, toCopy); in hashcrypt_sha_process_message_data() 711 hashcrypt_sha_one_block(base, &ctxInternal->blk.b[0]); in hashcrypt_sha_process_message_data() 785 (void)hashcrypt_memcpy(&ctxInternal->blk.b[0], message, messageSize); in hashcrypt_sha_process_message_data() 786 ctxInternal->blksz = messageSize; in hashcrypt_sha_process_message_data() 799 …ic status_t hashcrypt_sha_finalize(HASHCRYPT_Type *base, hashcrypt_sha_ctx_internal_t *ctxInternal) in hashcrypt_sha_finalize() argument [all …]
|
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/cau3/ |
D | fsl_cau3.c | 1669 static status_t cau3_hash_check_context(cau3_hash_ctx_internal_t *ctxInternal, const uint8_t *messa… in cau3_hash_check_context() argument 1671 …if ((NULL == message) || (NULL == ctxInternal) || (kStatus_Success != cau3_hash_check_input_alg(ct… in cau3_hash_check_context() 1858 static status_t cau3_hash_engine_init(CAU3_Type *base, cau3_hash_ctx_internal_t *ctxInternal) in cau3_hash_engine_init() argument 1864 if (kCAU3_Sha256 == ctxInternal->algo) in cau3_hash_engine_init() 1866 status = CAU3_Sha256InitializeOutput(base, ctxInternal->runningHash, kCAU3_TaskDonePoll); in cau3_hash_engine_init() 1869 if (kCAU3_Sha1 == ctxInternal->algo) in cau3_hash_engine_init() 1871 status = CAU3_Sha1InitializeOutput(base, ctxInternal->runningHash, kCAU3_TaskDonePoll); in cau3_hash_engine_init() 1891 cau3_hash_ctx_internal_t *ctxInternal, in cau3_hash_process_message_data() argument 1900 size_t toCopy = CAU3_HASH_BLOCK_SIZE - ctxInternal->blksz; in cau3_hash_process_message_data() 1901 (void)cau3_memcpy(&ctxInternal->blk.b[ctxInternal->blksz], message, toCopy); in cau3_hash_process_message_data() [all …]
|
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/caam/ |
D | fsl_caam.c | 2501 static status_t caam_hash_check_context(caam_hash_ctx_internal_t *ctxInternal, const uint8_t *data) in caam_hash_check_context() argument 2503 if ((NULL == data) || (NULL == ctxInternal) || (NULL == ctxInternal->base) || in caam_hash_check_context() 2504 (kStatus_Success != caam_hash_check_input_alg(ctxInternal->algo))) in caam_hash_check_context() 2656 static uint32_t caam_hash_sgt_insert(caam_hash_ctx_internal_t *ctxInternal, in caam_hash_sgt_insert() argument 2676 uint32_t ctxBlksz = (ctxInternal != NULL) ? ctxInternal->blksz : 0U; in caam_hash_sgt_insert() 2677 uint32_t ctxBlkAddr = (ctxInternal != NULL) ? (uint32_t)&ctxInternal->blk.b[0] : 0U; in caam_hash_sgt_insert() 2885 static status_t caam_hash_append_data(caam_hash_ctx_internal_t *ctxInternal, in caam_hash_append_data() argument 2896 …size_t num = caam_hash_sgt_insert(ctxInternal, input, inputSize, numRemain, algState, sgt, kCAAM_H… in caam_hash_append_data() 2897 …return caam_hash_schedule_input_data(ctxInternal->base, ctxInternal->handle, ctxInternal->algo, sg… in caam_hash_append_data() 2899 … &ctxInternal->word[0], (uint32_t)&ctxInternal->word[kCAAM_HashCtxKeyStartIdx], in caam_hash_append_data() [all …]
|
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/ltc/ |
D | fsl_ltc.c | 3052 static status_t ltc_hash_check_context(ltc_hash_ctx_internal_t *ctxInternal, const uint8_t *data) in ltc_hash_check_context() argument 3054 if ((NULL == data) || (NULL == ctxInternal) || (NULL == ctxInternal->base) || in ltc_hash_check_context() 3055 (kStatus_Success != ltc_hash_check_input_alg(ctxInternal->algo))) in ltc_hash_check_context() 3549 ltc_hash_ctx_internal_t *ctxInternal; in LTC_HASH_Init() local 3559 ctxInternal = (ltc_hash_ctx_internal_t *)(uint32_t)ctx; in LTC_HASH_Init() 3560 ctxInternal->algo = algo; in LTC_HASH_Init() 3563 ctxInternal->word[i] = 0u; in LTC_HASH_Init() 3570 ctxInternal->word[kLTC_HashCtxKeySize] = keySize; in LTC_HASH_Init() 3571 ltc_memcpy(&ctxInternal->word[kLTC_HashCtxKeyStartIdx], key, keySize); in LTC_HASH_Init() 3573 ctxInternal->blksz = 0u; in LTC_HASH_Init() [all …]
|