]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libstrongswan/plugins/random/random_plugin.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / plugins / random / random_plugin.h
1 /*
2 * Copyright (C) 2008 Martin Willi
3 *
4 * Copyright (C) secunet Security Networks AG
5 *
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>.
10 *
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
14 * for more details.
15 */
16
17 /**
18 * @defgroup random_p random
19 * @ingroup plugins
20 *
21 * @defgroup random_plugin random_plugin
22 * @{ @ingroup random_p
23 */
24
25 #ifndef RANDOM_PLUGIN_H_
26 #define RANDOM_PLUGIN_H_
27
28 #include <plugins/plugin.h>
29
30 typedef struct random_plugin_t random_plugin_t;
31
32 /**
33 * Plugin implementing a RNG reading from /dev/[u]random.
34 */
35 struct random_plugin_t {
36
37 /**
38 * implements plugin interface
39 */
40 plugin_t plugin;
41 };
42
43 /**
44 * Get the /dev/random file descriptor
45 */
46 int random_plugin_get_dev_random();
47
48 /**
49 * Get the /dev/urandom file descriptor
50 */
51 int random_plugin_get_dev_urandom();
52
53 /**
54 * Must strong randomness be equivalent to true randomness?
55 */
56 bool random_plugin_get_strong_equals_true();
57
58 #endif /** RANDOM_PLUGIN_H_ @}*/