KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
fs_random.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 kos/fs_random.h
4 Copyright (C) 2023 Luke Benstead
5
6*/
7
8/** \file kos/fs_random.h
9 \brief Driver for /dev/random and /dev/urandom.
10 \ingroup vfs_rnd
11
12 This filesystem driver provides implementations of /dev/random
13 and /dev/urandom for portability. It seeds randomness from
14 uninitialized memory, and the clock. Obviously we
15 are limited in how we can provide sufficient entropy on an
16 embedded platform like the Dreamcast so the randomness from
17 this driver will not win any awards but it should be sufficiently
18 good for most purposes.
19
20 /dev/random is an alias to /dev/urandom for now.
21
22 \author Luke Benstead
23*/
24
25#ifndef __DC_FS_RANDOM_H
26#define __DC_FS_RANDOM_H
27
28#include <sys/cdefs.h>
29__BEGIN_DECLS
30
31#include <kos/fs.h>
32
33/** \defgroup vfs_rnd Random
34 \brief VFS driver for /dev/random and /dev/urandom
35 \ingroup vfs
36
37 @{
38*/
39
40/* \cond */
41/* Initialization */
42int fs_rnd_init(void);
43int fs_rnd_shutdown(void);
44/* \endcond */
45
46/** @} */
47
48__END_DECLS
49
50#endif /* __DC_FS_RANDOM_H */
51
Virtual filesystem support.