WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
upg_verify.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.
3 * Description: UPG verify header file.
4 */
5
6#ifndef UPG_VERIFY_H
7#define UPG_VERIFY_H
8
9#include "upg.h"
10#include "errcode.h"
11
12#ifdef __cplusplus
13#if __cplusplus
14extern "C" {
15#endif
16#endif
17
18typedef struct upg_auth_data {
19 uint32_t length;
20 uint8_t *data;
22
23errcode_t verify_hash_cmp(const uint8_t *hash, const uint8_t *hash_res, uint32_t hash_len);
24
25errcode_t secure_authenticate(const uint8_t *key, const upg_auth_data_t *data, uint8_t *sign_buff);
26
27errcode_t calc_hash(uint32_t src_addr, uint32_t src_len, uint8_t *data_sha, uint32_t data_sha_len);
28
30
31#ifdef __cplusplus
32#if __cplusplus
33}
34#endif
35#endif
36
37#endif /* UPG_VERIFY_H */
uint32_t errcode_t
Definition of error code.
Definition errcode.h:30
Definition upg_verify.h:18
uint32_t length
Definition upg_verify.h:19
uint8_t * data
Definition upg_verify.h:20
升级包头类型
Definition upg.h:236
Definition hal_uart_v151_regs_def.h:38
errcode_t secure_authenticate(const uint8_t *key, const upg_auth_data_t *data, uint8_t *sign_buff)
Definition upg_verify.c:364
errcode_t uapi_upg_check_head_integrity(const upg_package_header_t *pkg_header)
Definition upg_verify.c:803
errcode_t calc_hash(uint32_t src_addr, uint32_t src_len, uint8_t *data_sha, uint32_t data_sha_len)
struct upg_auth_data upg_auth_data_t
errcode_t verify_hash_cmp(const uint8_t *hash, const uint8_t *hash_res, uint32_t hash_len)
Definition upg_verify.c:67