mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
22 lines
457 B
C
22 lines
457 B
C
/**
|
|
* @file random.h
|
|
* @brief OS-seeded pseudo-random number generation support (ChaCha algorithm).
|
|
* @author plutoo
|
|
* @copyright libnx Authors
|
|
*/
|
|
#pragma once
|
|
#include "../types.h"
|
|
|
|
/**
|
|
* @brief Fills a buffer with random data.
|
|
* @param buf Pointer to the buffer.
|
|
* @param len Size of the buffer in bytes.
|
|
*/
|
|
void randomGet(void* buf, size_t len);
|
|
|
|
/**
|
|
* @brief Returns a random 64-bit value.
|
|
* @return Random value.
|
|
*/
|
|
u64 randomGet64(void);
|