Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
random.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013-2014 Wind River Systems, Inc.
3 * Copyright (c) 2023 Intel Corporation
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
21#ifndef ZEPHYR_INCLUDE_RANDOM_RANDOM_H_
22#define ZEPHYR_INCLUDE_RANDOM_RANDOM_H_
23
24#include <zephyr/types.h>
25#include <stddef.h>
26#include <zephyr/kernel.h>
27
35#ifdef __cplusplus
36extern "C" {
37#endif
38
48__syscall uint32_t sys_rand32_get(void);
49
61__syscall void sys_rand_get(void *dst, size_t len);
62
76__syscall int sys_csrand_get(void *dst, size_t len);
77
78#ifdef __cplusplus
79}
80#endif
81
86#include <syscalls/random.h>
87#endif /* ZEPHYR_INCLUDE_RANDOM_RANDOM_H_ */
int sys_csrand_get(void *dst, size_t len)
Fill the destination buffer with cryptographically secure random data values.
uint32_t sys_rand32_get(void)
Return a 32-bit random value that should pass general randomness tests.
void sys_rand_get(void *dst, size_t len)
Fill the destination buffer with random data values that should pass general randomness tests.
Public kernel APIs.
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90