2 * Copyright (C) 2008 Martin Willi
4 * Copyright (C) secunet Security Networks AG
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 * @defgroup random_p random
21 * @defgroup random_plugin random_plugin
22 * @{ @ingroup random_p
25 #ifndef RANDOM_PLUGIN_H_
26 #define RANDOM_PLUGIN_H_
28 #include <plugins/plugin.h>
30 typedef struct random_plugin_t random_plugin_t
;
33 * Plugin implementing a RNG reading from /dev/[u]random.
35 struct random_plugin_t
{
38 * implements plugin interface
44 * Get the /dev/random file descriptor
46 int random_plugin_get_dev_random();
49 * Get the /dev/urandom file descriptor
51 int random_plugin_get_dev_urandom();
54 * Must strong randomness be equivalent to true randomness?
56 bool random_plugin_get_strong_equals_true();
58 #endif /** RANDOM_PLUGIN_H_ @}*/