libnx
v4.7.0
include
switch
kernel
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
*/
15
void
randomGet
(
void
* buf,
size_t
len);
16
17
/**
18
* @brief Returns a random 64-bit value.
19
* @return Random value.
20
*/
21
u64
randomGet64
(
void
);
randomGet
void randomGet(void *buf, size_t len)
Fills a buffer with random data.
randomGet64
u64 randomGet64(void)
Returns a random 64-bit value.
u64
uint64_t u64
64-bit unsigned integer.
Definition:
types.h:22
Generated by
1.9.1