Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / crypto / hcrypto / kernel / rand-timer.c
1 /*
2 * Stub rand-timer "implementation" so that rand-fortuna is linkable
3 * into the kernel.
4 *
5 * Contains no copyrightable content.
6 */
7 #include <config.h>
8
9 #include <rand.h>
10 #include "randi.h"
11
12 static void
13 timer_seed(const void *indata, int size)
14 {
15 }
16
17 static int
18 timer_bytes(unsigned char *outdata, int size)
19 {
20 return 1;
21 }
22
23 static void
24 timer_cleanup(void)
25 {
26 }
27
28 static void
29 timer_add(const void *indata, int size, double entropi)
30 {
31 }
32
33 static int
34 timer_pseudorand(unsigned char *outdata, int size)
35 {
36 return 1;
37 }
38
39 static int
40 timer_status(void)
41 {
42 return 0;
43 }
44
45 const RAND_METHOD hc_rand_timer_method = {
46 timer_seed,
47 timer_bytes,
48 timer_cleanup,
49 timer_add,
50 timer_pseudorand,
51 timer_status
52 };
53
54 const RAND_METHOD *
55 RAND_timer_method(void)
56 {
57 return &hc_rand_timer_method;
58 }