WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
drv_hash.c 文件参考
#include "drv_hash.h"
#include "drv_inner.h"
#include "hal_hash.h"
#include "crypto_drv_common.h"
drv_hash.c 的引用(Include)关系图:

结构体

struct  crypto_hash_ctx
 
struct  hal_hash_channel_context
 
struct  hash_state_t
 
struct  hash_state_item_t
 

宏定义

#define CRYPTO_INVALID_CHN_NUM   (0xFFFFFFFF)
 
#define HASH_COMPAT_ERRNO(err_code)   DRV_COMPAT_ERRNO(ERROR_MODULE_HASH, err_code)
 
#define hash_null_ptr_chk(ptr)    crypto_chk_return((ptr) == TD_NULL, HASH_COMPAT_ERRNO(ERROR_PARAM_IS_NULL), #ptr" is NULL\n")
 
#define CRYPTO_DRV_HASH_MAX_DMA_SIZE   (CRYPTO_HASH_DRV_BUFFER_SIZE * CRYPTO_HASH_HARD_CHN_CNT)
 

函数

td_s32 drv_cipher_hash_init (td_void)
 
td_s32 drv_cipher_hash_deinit (td_void)
 
td_s32 drv_cipher_hash_start (td_handle *drv_hash_handle, const crypto_hash_attr *hash_attr)
 
td_s32 drv_cipher_hash_update (td_handle drv_hash_handle, const crypto_buf_attr *src_buf, const td_u32 len)
 
td_s32 drv_cipher_hash_finish (td_handle drv_hash_handle, td_u8 *out, td_u32 *out_len)
 
td_s32 drv_cipher_hash_finish_data (td_handle drv_hash_handle, td_u8 *out, td_u32 *out_len)
 
td_s32 drv_cipher_hash_get (td_handle drv_hash_handle, crypto_hash_clone_ctx *hash_ctx)
 
td_s32 drv_cipher_hash_set (td_handle drv_hash_handle, const crypto_hash_clone_ctx *hash_ctx)
 
td_s32 drv_cipher_hash_destroy (td_handle drv_hash_handle)
 
const td_u32drv_hash_get_state_iv (crypto_hash_type hash_type, td_u32 *iv_size)
 
td_s32 inner_hash_drv_handle_chk (td_handle hash_handle)
 
td_s32 inner_hash_start_param_chk (td_handle *drv_hash_handle, const crypto_hash_attr *hash_attr)
 

宏定义说明

◆ CRYPTO_DRV_HASH_MAX_DMA_SIZE

#define CRYPTO_DRV_HASH_MAX_DMA_SIZE   (CRYPTO_HASH_DRV_BUFFER_SIZE * CRYPTO_HASH_HARD_CHN_CNT)

◆ CRYPTO_INVALID_CHN_NUM

#define CRYPTO_INVALID_CHN_NUM   (0xFFFFFFFF)

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved.

Description: cipher hash driver.
History:
2023-03-22, Create file.

◆ HASH_COMPAT_ERRNO

#define HASH_COMPAT_ERRNO (   err_code)    DRV_COMPAT_ERRNO(ERROR_MODULE_HASH, err_code)

◆ hash_null_ptr_chk

#define hash_null_ptr_chk (   ptr)     crypto_chk_return((ptr) == TD_NULL, HASH_COMPAT_ERRNO(ERROR_PARAM_IS_NULL), #ptr" is NULL\n")

函数说明

◆ drv_cipher_hash_deinit()

td_s32 drv_cipher_hash_deinit ( td_void  )

◆ drv_cipher_hash_destroy()

td_s32 drv_cipher_hash_destroy ( td_handle  drv_hash_handle)

◆ drv_cipher_hash_finish()

td_s32 drv_cipher_hash_finish ( td_handle  drv_hash_handle,
td_u8 out,
td_u32 out_len 
)

◆ drv_cipher_hash_finish_data()

td_s32 drv_cipher_hash_finish_data ( td_handle  drv_hash_handle,
td_u8 out,
td_u32 out_len 
)

◆ drv_cipher_hash_get()

td_s32 drv_cipher_hash_get ( td_handle  drv_hash_handle,
crypto_hash_clone_ctx hash_ctx 
)

◆ drv_cipher_hash_init()

td_s32 drv_cipher_hash_init ( td_void  )

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved.

Description: cipher driver hash header.
History:
2023-03-22, Create file.

◆ drv_cipher_hash_set()

td_s32 drv_cipher_hash_set ( td_handle  drv_hash_handle,
const crypto_hash_clone_ctx hash_ctx 
)

◆ drv_cipher_hash_start()

td_s32 drv_cipher_hash_start ( td_handle drv_hash_handle,
const crypto_hash_attr hash_attr 
)

◆ drv_cipher_hash_update()

td_s32 drv_cipher_hash_update ( td_handle  drv_hash_handle,
const crypto_buf_attr src_buf,
const td_u32  len 
)

◆ drv_hash_get_state_iv()

const td_u32 * drv_hash_get_state_iv ( crypto_hash_type  hash_type,
td_u32 iv_size 
)

◆ inner_hash_drv_handle_chk()

td_s32 inner_hash_drv_handle_chk ( td_handle  hash_handle)

◆ inner_hash_start_param_chk()

td_s32 inner_hash_start_param_chk ( td_handle drv_hash_handle,
const crypto_hash_attr hash_attr 
)