WS63 SDK 文档
7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
sec_random.h
浏览该文件的文档.
1
/*
2
* Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2012-2020. All rights reserved.
3
* Description: The head file of sec_random.c
4
*/
5
#ifndef SEC_RANDOM_H
6
#define SEC_RANDOM_H
7
8
#include "
chip_definitions.h
"
9
10
#if !CHIP_WS63 && !CHIP_WS53
11
#define HASH_DIGEST_LENGTH 32
// hash digest length
12
13
#define DEFAULT_CONST "HRAND CONNECTIVITY CHIP"
14
#define DEFAULT_CONST_LEN 23
15
#define POOL_LEN HASH_DIGEST_LENGTH
16
17
typedef
struct
{
18
uint8_t v[POOL_LEN];
19
uint8_t c[POOL_LEN];
20
} hrand_ctx;
21
22
void
init_rand(
void
);
23
uint32_t sec_rand(
void
);
// Secure random number
24
uint32_t nsec_rand(
void
);
// Unsafe random number
25
void
sec_rand_bytes(uint8_t *output, uint32_t output_len);
26
#endif
27
#endif
chip_definitions.h
src
middleware
utils
algorithm
sec_random
sec_random.h
由
William Goodspeed
维护 | E-mail: gongzl@stu.hebust.edu.cn | Wechat: a23333344 | ALSO CHECKOUT
WS63FLASH
!
生成于 2025年 一月 4日 星期六 17:47:12 , 为 WS63 SDK 文档使用
1.9.8