Home
last modified time | relevance | path

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

/base/startup/hvb/libhvb/src/crypto/
Dhvb_hash_sha256.c229 int hash_sha256_single(const void *msg, uint32_t msg_len, uint8_t *out, uint32_t out_len) in hash_sha256_single() argument
235 total_bit_len = (uint64_t)msg_len * 8; // 8bit per byte in hash_sha256_single()
236 if (total_bit_len < msg_len) { in hash_sha256_single()
242 data_size = (msg_len / BLK_BYTE_SIZE_SHA256) * BLK_BYTE_SIZE_SHA256; in hash_sha256_single()
248 hash_sha256_pad_update(iv, (uint8_t *)msg + data_size, msg_len - data_size, total_bit_len); in hash_sha256_single()
284 int hash_calc_update(struct hash_ctx_t *hash_ctx, const void *msg, uint32_t msg_len) in hash_calc_update() argument
303 hash_ctx->total_len = hash_ctx->total_len + msg_len; in hash_calc_update()
307 if (hash_ctx->buf_len != 0 && msg_len >= left_len) { in hash_calc_update()
313 msg_len = msg_len - left_len; in hash_calc_update()
317 if (msg_len >= blk_len) { in hash_calc_update()
[all …]
/base/startup/hvb/libhvb/include/
Dhvb_crypto.h61 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…
65 int hash_sha256_single(const void *msg, uint32_t msg_len, uint8_t *out, uint32_t out_len);