TuyaOS
uni_random.h
浏览该文件的文档.
1
11#ifndef __UNI_RANDOM_H__
12#define __UNI_RANDOM_H__
13
14
15#include <stdint.h>
16#include <stddef.h>
17
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
28uint32_t uni_random(void);
29int uni_random_init(void);
30
38int uni_random_string(char* dst, int size);
39
40
41int uni_random_range(unsigned int range);
42
43int uni_random_bytes(unsigned char *output, size_t output_len);
44
45
46#ifdef __cplusplus
47}
48#endif /* __cplusplus */
49
50
51#endif /* __UNI_RANDOM_H__ */
uint32_t uni_random(void)
generate a random 32bit unsigned integer
int uni_random_string(char *dst, int size)
generate a random string