Home
last modified time | relevance | path

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

/ohos5.0/base/startup/hvb/libhvb/src/crypto/
H A Dhvb_hash_sha256.c282 if (hash_ctx == NULL) { in hash_ctx_init()
287 hash_ctx->buf_len = 0; in hash_ctx_init()
288 hash_ctx->total_len = 0; in hash_ctx_init()
314 if (hash_ctx->buf_len >= blk_len) { in hash_calc_update()
318 hash_ctx->total_len = hash_ctx->total_len + msg_len; in hash_calc_update()
323 hvb_memcpy(hash_ctx->blk_buf + hash_ctx->buf_len, msg, left_len); in hash_calc_update()
324 (void)sha256_data_blk_update(hash_ctx->iv, hash_ctx->blk_buf, blk_len); in hash_calc_update()
326 hash_ctx->buf_len = 0; in hash_calc_update()
341 hvb_memcpy(hash_ctx->blk_buf + hash_ctx->buf_len, msg, msg_len); in hash_calc_update()
342 hash_ctx->buf_len = hash_ctx->buf_len + msg_len; in hash_calc_update()
[all …]
/ohos5.0/base/startup/hvb/libhvb/include/
H A Dhvb_crypto.h59 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…