Home
last modified time | relevance | path

Searched refs:hash_ctx (Results 1 – 15 of 15) sorted by relevance

/Zephyr-latest/subsys/storage/flash_map/
Dflash_map_integrity.c36 psa_hash_operation_t hash_ctx; in flash_area_check_int_sha256() local
38 mbedtls_sha256_context hash_ctx; in flash_area_check_int_sha256() local
54 hash_ctx = psa_hash_operation_init(); in flash_area_check_int_sha256()
55 rc = psa_hash_setup(&hash_ctx, PSA_ALG_SHA_256); in flash_area_check_int_sha256()
57 mbedtls_sha256_init(&hash_ctx); in flash_area_check_int_sha256()
58 rc = mbedtls_sha256_starts(&hash_ctx, false); in flash_area_check_int_sha256()
78 rc = psa_hash_update(&hash_ctx, fac->rbuf, to_read); in flash_area_check_int_sha256()
80 rc = mbedtls_sha256_update(&hash_ctx, fac->rbuf, to_read); in flash_area_check_int_sha256()
91 rc = psa_hash_finish(&hash_ctx, hash, sizeof(hash), &hash_len); in flash_area_check_int_sha256()
93 rc = mbedtls_sha256_finish(&hash_ctx, hash); in flash_area_check_int_sha256()
[all …]
/Zephyr-latest/include/zephyr/crypto/
Dhash.h34 struct hash_ctx;
38 typedef int (*hash_op_t)(struct hash_ctx *ctx, struct hash_pkt *pkt,
47 struct hash_ctx { struct
107 struct hash_ctx *ctx;
Dcrypto.h84 int (*hash_begin_session)(const struct device *dev, struct hash_ctx *ctx,
87 int (*hash_free_session)(const struct device *dev, struct hash_ctx *ctx);
385 struct hash_ctx *ctx, in hash_begin_session()
420 struct hash_ctx *ctx) in hash_free_session()
466 static inline int hash_compute(struct hash_ctx *ctx, struct hash_pkt *pkt) in hash_compute()
485 static inline int hash_update(struct hash_ctx *ctx, struct hash_pkt *pkt) in hash_update()
/Zephyr-latest/subsys/mgmt/mcumgr/grp/fs_mgmt/src/
Dfs_mgmt_hash_checksum_sha256.c43 hash_ctx_t hash_ctx; in fs_mgmt_hash_checksum_sha256() local
49 if (hash_setup(&hash_ctx) != SUCCESS_VALUE) { in fs_mgmt_hash_checksum_sha256()
66 if (hash_update(&hash_ctx, buffer, bytes_read) != SUCCESS_VALUE) { in fs_mgmt_hash_checksum_sha256()
75 if (hash_finish(&hash_ctx, output) == SUCCESS_VALUE) { in fs_mgmt_hash_checksum_sha256()
80 hash_teardown(&hash_ctx); in fs_mgmt_hash_checksum_sha256()
/Zephyr-latest/samples/net/sockets/big_http_download/src/
Dbig_http_download.c82 mbedtls_md_context_t hash_ctx; variable
316 mbedtls_md_starts(&hash_ctx); in download()
335 mbedtls_md_update(&hash_ctx, response, len); in download()
347 mbedtls_md_finish(&hash_ctx, response_hash); in download()
456 mbedtls_md_init(&hash_ctx); in main()
457 if (mbedtls_md_setup(&hash_ctx, hash_info, 0) < 0) { in main()
486 mbedtls_md_free(&hash_ctx); in main()
/Zephyr-latest/drivers/crypto/
Dcrypto_mcux_dcp.c27 dcp_hash_ctx_t hash_ctx; member
246 static int crypto_dcp_sha256(struct hash_ctx *ctx, struct hash_pkt *pkt, bool finish) in crypto_dcp_sha256()
253 status = DCP_HASH_Update(cfg->base, &session->hash_ctx, pkt->in_buf, pkt->in_len); in crypto_dcp_sha256()
262 status = DCP_HASH_Finish(cfg->base, &session->hash_ctx, pkt->out_buf, NULL); in crypto_dcp_sha256()
269 static int crypto_dcp_hash_begin_session(const struct device *dev, struct hash_ctx *ctx, in crypto_dcp_hash_begin_session()
289 status = DCP_HASH_Init(cfg->base, &session->handle, &session->hash_ctx, kDCP_Sha256); in crypto_dcp_hash_begin_session()
301 static int crypto_dcp_hash_free_session(const struct device *dev, struct hash_ctx *ctx) in crypto_dcp_hash_free_session()
Dcrypto_it8xxx2_sha.c132 static int it8xxx2_hash_handler(struct hash_ctx *ctx, struct hash_pkt *pkt, in it8xxx2_hash_handler()
174 struct hash_ctx *ctx) in it8xxx2_hash_session_free()
187 struct hash_ctx *ctx, enum hash_algo algo) in it8xxx2_hash_begin_session()
Dcrypto_npcx_sha.c83 static int npcx_sha_compute(struct hash_ctx *ctx, struct hash_pkt *pkt, bool finish) in npcx_sha_compute()
135 static int npcx_hash_session_setup(const struct device *dev, struct hash_ctx *ctx, in npcx_hash_session_setup()
173 static int npcx_hash_session_free(const struct device *dev, struct hash_ctx *ctx) in npcx_hash_session_free()
Dcrypto_it8xxx2_sha_v2.c146 static int it8xxx2_hash_handler(struct hash_ctx *ctx, struct hash_pkt *pkt, in it8xxx2_hash_handler()
294 struct hash_ctx *ctx) in it8xxx2_hash_session_free()
307 struct hash_ctx *ctx, enum hash_algo algo) in it8xxx2_hash_begin_session()
Dcrypto_intel_sha.c197 static int intel_sha_compute(struct hash_ctx *ctx, struct hash_pkt *pkt, bool finish) in intel_sha_compute()
284 static int intel_sha_device_set_hash_type(const struct device *dev, struct hash_ctx *ctx, in intel_sha_device_set_hash_type()
310 static int intel_sha_device_free(const struct device *dev, struct hash_ctx *ctx) in intel_sha_device_free()
Dcrypto_mchp_xec_symcr.c298 static int xec_symcr_do_hash(struct hash_ctx *ctx, struct hash_pkt *pkt, bool finish) in xec_symcr_do_hash()
395 static int xec_symcr_hash_session_begin(const struct device *dev, struct hash_ctx *ctx, in xec_symcr_hash_session_begin()
470 static int xec_symcr_hash_session_free(const struct device *dev, struct hash_ctx *ctx) in xec_symcr_hash_session_free()
Dcrypto_mtls_shim.c465 static int mtls_sha256_compute(struct hash_ctx *ctx, struct hash_pkt *pkt, in mtls_sha256_compute()
501 static int mtls_sha512_compute(struct hash_ctx *ctx, struct hash_pkt *pkt, in mtls_sha512_compute()
537 struct hash_ctx *ctx, in mtls_hash_session_setup()
581 static int mtls_hash_session_free(const struct device *dev, struct hash_ctx *ctx) in mtls_hash_session_free()
Dcrypto_smartbond.c712 static int crypto_smartbond_hash_handler(struct hash_ctx *ctx, struct hash_pkt *pkt, bool finish) in crypto_smartbond_hash_handler()
870 struct hash_ctx *ctx, enum hash_algo algo) in crypto_smartbond_hash_begin_session()
904 static int crypto_smartbond_hash_free_session(const struct device *dev, struct hash_ctx *ctx) in crypto_smartbond_hash_free_session()
/Zephyr-latest/tests/crypto/crypto_hash/src/
Dmain.c138 struct hash_ctx ctx; in ZTEST_USER()
/Zephyr-latest/samples/boards/microchip/mec172xevb_assy6906/rom_api/src/
Dmain.c261 static struct hash_ctx zhash_ctx;