libnx v4.9.0
Loading...
Searching...
No Matches
Functions
random.h File Reference

OS-seeded pseudo-random number generation support (ChaCha algorithm). More...

#include "../types.h"

Go to the source code of this file.

Functions

void randomGet (void *buf, size_t len)
 Fills a buffer with random data.
 
u64 randomGet64 (void)
 Returns a random 64-bit value.
 

Detailed Description

OS-seeded pseudo-random number generation support (ChaCha algorithm).

Author
plutoo

Function Documentation

◆ randomGet()

void randomGet ( void *  buf,
size_t  len 
)

Fills a buffer with random data.

Parameters
bufPointer to the buffer.
lenSize of the buffer in bytes.

◆ randomGet64()

u64 randomGet64 ( void  )

Returns a random 64-bit value.

Returns
Random value.