libnx  v4.6.0
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. More...
 
u64 randomGet64 (void)
 Returns a random 64-bit value. More...
 

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.