Deleted Added
full compact
yarrow.h (67112) yarrow.h (69168)
1/*-
2 * Copyright (c) 2000 Mark R V Murray
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2000 Mark R V Murray
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/random/yarrow.h 67112 2000-10-14 10:59:56Z markm $
26 * $FreeBSD: head/sys/dev/random/yarrow.h 69168 2000-11-25 17:09:01Z markm $
27 */
28
29/* #define ENTROPYSOURCE nn entropy sources (actually classes)
30 * The entropy classes will as follows:
31 * 0 - Direct write
32 * 1 - Keyboard
33 * 2 - Mouse
34 */
35
36#define ENTROPYBIN 256 /* buckets to harvest entropy events */
37#define TIMEBIN 16 /* max value for Pt/t */
38
39#define HARVESTSIZE 16 /* max size of each harvested entropy unit */
40
41#define FAST 0
42#define SLOW 1
43
44int random_init(void);
45void random_deinit(void);
27 */
28
29/* #define ENTROPYSOURCE nn entropy sources (actually classes)
30 * The entropy classes will as follows:
31 * 0 - Direct write
32 * 1 - Keyboard
33 * 2 - Mouse
34 */
35
36#define ENTROPYBIN 256 /* buckets to harvest entropy events */
37#define TIMEBIN 16 /* max value for Pt/t */
38
39#define HARVESTSIZE 16 /* max size of each harvested entropy unit */
40
41#define FAST 0
42#define SLOW 1
43
44int random_init(void);
45void random_deinit(void);
46void random_init_harvester(void (*)(struct timespec *, void *, u_int, u_int, u_int, enum esource), u_int (*)(void *, u_int));
46void random_init_harvester(void (*)(u_int64_t, void *, u_int, u_int, u_int, enum esource), u_int (*)(void *, u_int));
47void random_deinit_harvester(void);
48void random_set_wakeup_exit(void *);
49
50u_int read_random_real(void *, u_int);
51void write_random(void *, u_int);
52
53/* This is the beastie that needs protecting. It contains all of the
54 * state that we are excited about.

--- 25 unchanged lines hidden ---
47void random_deinit_harvester(void);
48void random_set_wakeup_exit(void *);
49
50u_int read_random_real(void *, u_int);
51void write_random(void *, u_int);
52
53/* This is the beastie that needs protecting. It contains all of the
54 * state that we are excited about.

--- 25 unchanged lines hidden ---