Searched refs:hash_ctx (Results 1 – 2 of 2) sorted by relevance
/base/startup/hvb/libhvb/src/crypto/ |
D | hvb_hash_sha256.c | 265 int hash_ctx_init(struct hash_ctx_t *hash_ctx, enum hash_alg_type alg_type) in hash_ctx_init() argument 271 if (hash_ctx == NULL) { in hash_ctx_init() 275 hash_ctx->alg_type = (uint32_t)alg_type; in hash_ctx_init() 276 hash_ctx->buf_len = 0; in hash_ctx_init() 277 hash_ctx->total_len = 0; in hash_ctx_init() 279 (void)hvb_memcpy(hash_ctx->iv, sha256_iv_init, sizeof(sha256_iv_init)); in hash_ctx_init() 284 int hash_calc_update(struct hash_ctx_t *hash_ctx, const void *msg, uint32_t msg_len) in hash_calc_update() argument 290 if (hash_ctx == NULL) { in hash_calc_update() 294 blk_len = hash_alg_get_blklen(hash_ctx->alg_type); in hash_calc_update() 299 if (hash_ctx->buf_len >= blk_len) { in hash_calc_update() [all …]
|
/base/startup/hvb/libhvb/include/ |
D | hvb_crypto.h | 59 int hash_ctx_init(struct hash_ctx_t *hash_ctx, enum hash_alg_type); 61 int hash_calc_update(struct hash_ctx_t *hash_ctx, const void *msg, uint32_t msg_len); 63 int hash_calc_do_final(struct hash_ctx_t *hash_ctx, const void *msg, uint32_t msg_len, uint8_t *out…
|