Home
last modified time | relevance | path

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

/bsp/allwinner/libraries/sunxi-hal/hal/test/ce/
A Dtest_ce.c230 crypto_hash_req_ctx_t *hash_ctx = NULL; in hash_test() local
233 if (hash_ctx == NULL) { in hash_test()
249 hash_ctx->src_buffer = hash_src[j]; in hash_test()
250 hash_ctx->src_length = hash_src_len[j]; in hash_test()
252 hash_ctx->dst_buffer = dst_data; in hash_test()
253 hash_ctx->type = i; in hash_test()
254 hash_ctx->md_size = 0; in hash_test()
257 hash_ctx->dst_length = MD5_DIGEST_SIZE; in hash_test()
286 ret = do_hash_crypto(hash_ctx); in hash_test()
305 if (hash_ctx != NULL) { in hash_test()
[all …]
/bsp/hpmicro/libraries/hpm_sdk/drivers/src/
A Dhpm_sdp_drv.c63 static void sdp_hash_internal_engine_init(SDP_Type *base, sdp_hash_ctx_t *hash_ctx);
69 static hpm_stat_t sdp_hash_finalize(SDP_Type *base, sdp_hash_ctx_t *hash_ctx);
720 static void sdp_hash_internal_engine_init(SDP_Type *base, sdp_hash_ctx_t *hash_ctx) in sdp_hash_internal_engine_init() argument
815 assert((base != NULL) && (hash_ctx != NULL) && (data != NULL)); in sdp_hash_update()
834 sdp_hash_internal_engine_init(base, hash_ctx); in sdp_hash_update()
840 status = sdp_hash_process_message(base, hash_ctx, data, length); in sdp_hash_update()
846 static hpm_stat_t sdp_hash_finalize(SDP_Type *base, sdp_hash_ctx_t *hash_ctx) in sdp_hash_finalize() argument
857 hpm_stat_t sdp_hash_finish(SDP_Type *base, sdp_hash_ctx_t *hash_ctx, uint8_t *digest) in sdp_hash_finish() argument
859 assert((base != NULL) && (hash_ctx != NULL) && (digest != NULL)); in sdp_hash_finish()
865 sdp_hash_internal_engine_init(base, hash_ctx); in sdp_hash_finish()
[all …]
/bsp/nuvoton/libraries/m2354/rtt_port/
A Ddrv_crypto.c439 static rt_err_t nu_sha_update(struct hwcrypto_hash *hash_ctx, const rt_uint8_t *in, rt_size_t lengt… in nu_sha_update() argument
444 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_update()
448 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_update()
485 nu_sha_hash_run(hash_ctx->parent.contex, u32SHAOpMode, nu_in, length); in nu_sha_update()
495 static rt_err_t nu_sha_finish(struct hwcrypto_hash *hash_ctx, rt_uint8_t *out, rt_size_t length) in nu_sha_finish() argument
501 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_finish()
504 psSHACtx = hash_ctx->parent.contex; in nu_sha_finish()
507 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_finish()
/bsp/nuvoton/libraries/m460/rtt_port/
A Ddrv_crypto.c438 static rt_err_t nu_sha_update(struct hwcrypto_hash *hash_ctx, const rt_uint8_t *in, rt_size_t lengt… in nu_sha_update() argument
443 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_update()
447 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_update()
484 nu_sha_hash_run(hash_ctx->parent.contex, u32SHAOpMode, nu_in, length); in nu_sha_update()
494 static rt_err_t nu_sha_finish(struct hwcrypto_hash *hash_ctx, rt_uint8_t *out, rt_size_t length) in nu_sha_finish() argument
500 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_finish()
503 psSHACtx = hash_ctx->parent.contex; in nu_sha_finish()
506 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_finish()
/bsp/nuvoton/libraries/nuc980/rtt_port/
A Ddrv_crypto.c441 static rt_err_t nu_sha_update(struct hwcrypto_hash *hash_ctx, const rt_uint8_t *in, rt_size_t lengt… in nu_sha_update() argument
446 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_update()
450 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_update()
487 nu_sha_hash_run(hash_ctx->parent.contex, u32SHAOpMode, nu_in, length); in nu_sha_update()
497 static rt_err_t nu_sha_finish(struct hwcrypto_hash *hash_ctx, rt_uint8_t *out, rt_size_t length) in nu_sha_finish() argument
503 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_finish()
506 psSHACtx = hash_ctx->parent.contex; in nu_sha_finish()
509 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_finish()
/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6800/HPM6880/
A Dhpm_romapi.h277 hpm_stat_t (*hash_init)(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg);
279 hpm_stat_t (*hash_update)(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_t length);
281 hpm_stat_t (*hash_finish)(sdp_hash_ctx_t *hash_ctx, uint8_t *digest);
953 static inline hpm_stat_t rom_sdp_hash_init(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg) in rom_sdp_hash_init() argument
955 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_init(hash_ctx, alg); in rom_sdp_hash_init()
965 static inline hpm_stat_t rom_sdp_hash_update(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_… in rom_sdp_hash_update() argument
967 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_update(hash_ctx, data, length); in rom_sdp_hash_update()
976 static inline hpm_stat_t rom_sdp_hash_finish(sdp_hash_ctx_t *hash_ctx, uint8_t *digest) in rom_sdp_hash_finish() argument
978 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_finish(hash_ctx, digest); in rom_sdp_hash_finish()
/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6E00/HPM6E80/
A Dhpm_romapi.h306 hpm_stat_t (*hash_init)(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg);
308 hpm_stat_t (*hash_update)(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_t length);
310 hpm_stat_t (*hash_finish)(sdp_hash_ctx_t *hash_ctx, uint8_t *digest);
922 static inline hpm_stat_t rom_sdp_hash_init(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg) in rom_sdp_hash_init() argument
924 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_init(hash_ctx, alg); in rom_sdp_hash_init()
934 static inline hpm_stat_t rom_sdp_hash_update(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_… in rom_sdp_hash_update() argument
936 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_update(hash_ctx, data, length); in rom_sdp_hash_update()
945 static inline hpm_stat_t rom_sdp_hash_finish(sdp_hash_ctx_t *hash_ctx, uint8_t *digest) in rom_sdp_hash_finish() argument
947 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_finish(hash_ctx, digest); in rom_sdp_hash_finish()
/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6200/HPM6280/
A Dhpm_romapi.h277 hpm_stat_t (*hash_init)(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg);
279 hpm_stat_t (*hash_update)(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_t length);
281 hpm_stat_t (*hash_finish)(sdp_hash_ctx_t *hash_ctx, uint8_t *digest);
962 static inline hpm_stat_t rom_sdp_hash_init(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg) in rom_sdp_hash_init() argument
964 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_init(hash_ctx, alg); in rom_sdp_hash_init()
974 static inline hpm_stat_t rom_sdp_hash_update(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_… in rom_sdp_hash_update() argument
976 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_update(hash_ctx, data, length); in rom_sdp_hash_update()
985 static inline hpm_stat_t rom_sdp_hash_finish(sdp_hash_ctx_t *hash_ctx, uint8_t *digest) in rom_sdp_hash_finish() argument
987 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_finish(hash_ctx, digest); in rom_sdp_hash_finish()
/bsp/hpmicro/libraries/hpm_sdk/soc/HPM5300/HPM5361/
A Dhpm_romapi.h291 hpm_stat_t (*hash_init)(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg);
293 hpm_stat_t (*hash_update)(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_t length);
295 hpm_stat_t (*hash_finish)(sdp_hash_ctx_t *hash_ctx, uint8_t *digest);
875 static inline hpm_stat_t rom_sdp_hash_init(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg) in rom_sdp_hash_init() argument
877 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_init(hash_ctx, alg); in rom_sdp_hash_init()
887 static inline hpm_stat_t rom_sdp_hash_update(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_… in rom_sdp_hash_update() argument
889 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_update(hash_ctx, data, length); in rom_sdp_hash_update()
898 static inline hpm_stat_t rom_sdp_hash_finish(sdp_hash_ctx_t *hash_ctx, uint8_t *digest) in rom_sdp_hash_finish() argument
900 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_finish(hash_ctx, digest); in rom_sdp_hash_finish()
/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6700/HPM6750/
A Dhpm_romapi.h255 hpm_stat_t (*hash_init)(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg);
257 hpm_stat_t (*hash_update)(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_t length);
259 hpm_stat_t (*hash_finish)(sdp_hash_ctx_t *hash_ctx, uint8_t *digest);
847 static inline hpm_stat_t rom_sdp_hash_init(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg) in rom_sdp_hash_init() argument
849 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_init(hash_ctx, alg); in rom_sdp_hash_init()
859 static inline hpm_stat_t rom_sdp_hash_update(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_… in rom_sdp_hash_update() argument
861 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_update(hash_ctx, data, length); in rom_sdp_hash_update()
870 static inline hpm_stat_t rom_sdp_hash_finish(sdp_hash_ctx_t *hash_ctx, uint8_t *digest) in rom_sdp_hash_finish() argument
872 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_finish(hash_ctx, digest); in rom_sdp_hash_finish()
/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6300/HPM6360/
A Dhpm_romapi.h294 hpm_stat_t (*hash_init)(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg);
296 hpm_stat_t (*hash_update)(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_t length);
298 hpm_stat_t (*hash_finish)(sdp_hash_ctx_t *hash_ctx, uint8_t *digest);
920 static inline hpm_stat_t rom_sdp_hash_init(sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg) in rom_sdp_hash_init() argument
922 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_init(hash_ctx, alg); in rom_sdp_hash_init()
932 static inline hpm_stat_t rom_sdp_hash_update(sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_… in rom_sdp_hash_update() argument
934 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_update(hash_ctx, data, length); in rom_sdp_hash_update()
943 static inline hpm_stat_t rom_sdp_hash_finish(sdp_hash_ctx_t *hash_ctx, uint8_t *digest) in rom_sdp_hash_finish() argument
945 return ROM_API_TABLE_ROOT->sdp_driver_if->hash_finish(hash_ctx, digest); in rom_sdp_hash_finish()
/bsp/nuvoton/libraries/m480/rtt_port/
A Ddrv_crypto.c616 static rt_err_t nu_sha_update(struct hwcrypto_hash *hash_ctx, const rt_uint8_t *in, rt_size_t lengt… in nu_sha_update() argument
621 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_update()
625 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_update()
662 nu_sha_hash_run(hash_ctx->parent.contex, u32SHAOpMode, nu_in, length); in nu_sha_update()
672 static rt_err_t nu_sha_finish(struct hwcrypto_hash *hash_ctx, rt_uint8_t *out, rt_size_t length) in nu_sha_finish() argument
678 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_finish()
681 psSHACtx = hash_ctx->parent.contex; in nu_sha_finish()
684 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_finish()
/bsp/nuvoton/libraries/n9h30/rtt_port/
A Ddrv_crypto.c630 static rt_err_t nu_sha_update(struct hwcrypto_hash *hash_ctx, const rt_uint8_t *in, rt_size_t lengt… in nu_sha_update() argument
635 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_update()
639 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_update()
676 nu_sha_hash_run(hash_ctx->parent.contex, u32SHAOpMode, nu_in, length); in nu_sha_update()
686 static rt_err_t nu_sha_finish(struct hwcrypto_hash *hash_ctx, rt_uint8_t *out, rt_size_t length) in nu_sha_finish() argument
692 RT_ASSERT(hash_ctx != RT_NULL); in nu_sha_finish()
695 psSHACtx = hash_ctx->parent.contex; in nu_sha_finish()
698 switch (hash_ctx->parent.type & (HWCRYPTO_MAIN_TYPE_MASK | HWCRYPTO_SUB_TYPE_MASK)) in nu_sha_finish()
/bsp/hpmicro/libraries/hpm_sdk/drivers/inc/
A Dhpm_sdp_drv.h637 hpm_stat_t sdp_hash_init(SDP_Type *base, sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg);
648 hpm_stat_t sdp_hash_update(SDP_Type *base, sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_t …
658 hpm_stat_t sdp_hash_finish(SDP_Type *base, sdp_hash_ctx_t *hash_ctx, uint8_t *digest);

Completed in 63 milliseconds