libnx v4.9.0
Loading...
Searching...
No Matches
random.h
Go to the documentation of this file.
1/**
2 * @file random.h
3 * @brief OS-seeded pseudo-random number generation support (ChaCha algorithm).
4 * @author plutoo
5 * @copyright libnx Authors
6 */
7#pragma once
8#include "../types.h"
9
10/**
11 * @brief Fills a buffer with random data.
12 * @param buf Pointer to the buffer.
13 * @param len Size of the buffer in bytes.
14 */
15void randomGet(void* buf, size_t len);
16
17/**
18 * @brief Returns a random 64-bit value.
19 * @return Random value.
20 */
void randomGet(void *buf, size_t len)
Fills a buffer with random data.
u64 randomGet64(void)
Returns a random 64-bit value.
uint64_t u64
64-bit unsigned integer.
Definition types.h:22