Select one of the symbols to view example projects that use it.
 
Outline
#include <sys/random.h>
#include <errno.h>
getentropy(void *, size_t)
newlib_include_getentropy_impl()
Files
loading (3/5)...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/newlib/getentropy.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #include <sys/random.h> #include <errno.h> int getentropy(void *buffer, size_t length) { ssize_t ret; if (buffer == NULL) { errno = EFAULT; return -1; }{...} if (length > 256) { errno = EIO; return -1; }{...} ret = getrandom(buffer, length, 0); if (ret == -1) { return -1; }{...} return 0; }{ ... } void newlib_include_getentropy_impl(void) { // Linker hook, exists for no other purpose }{ ... }
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.