Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Move RND_EXTRACT_{ANY, GOOD} to rndpool.h whose API they ...
details: https://anonhg.NetBSD.org/src/rev/b9702f60fce2
branches: trunk
changeset: 337434:b9702f60fce2
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Apr 14 13:14:20 2015 +0000
description:
Move RND_EXTRACT_{ANY,GOOD} to rndpool.h whose API they are part of.
diffstat:
sys/dev/rnd_private.h | 10 +---------
sys/sys/rndpool.h | 7 ++++++-
2 files changed, 7 insertions(+), 10 deletions(-)
diffs (45 lines):
diff -r 1acafde73fd5 -r b9702f60fce2 sys/dev/rnd_private.h
--- a/sys/dev/rnd_private.h Tue Apr 14 13:12:33 2015 +0000
+++ b/sys/dev/rnd_private.h Tue Apr 14 13:14:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rnd_private.h,v 1.10 2015/04/14 13:12:33 riastradh Exp $ */
+/* $NetBSD: rnd_private.h,v 1.11 2015/04/14 13:14:20 riastradh Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -47,14 +47,6 @@
*/
#define RND_ENTROPY_THRESHOLD 10
-/*
- * Used by rnd_extract_data() and rndpool_extract_data() to describe how
- * "good" the data has to be.
- */
-#define RND_EXTRACT_ANY 0 /* extract anything, even if no entropy */
-#define RND_EXTRACT_GOOD 1 /* return as many good bytes
- (short read ok) */
-
bool rnd_extract(void *, size_t);
bool rnd_tryextract(void *, size_t);
void rnd_getmore(size_t);
diff -r 1acafde73fd5 -r b9702f60fce2 sys/sys/rndpool.h
--- a/sys/sys/rndpool.h Tue Apr 14 13:12:33 2015 +0000
+++ b/sys/sys/rndpool.h Tue Apr 14 13:14:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rndpool.h,v 1.2 2015/04/13 23:21:03 riastradh Exp $ */
+/* $NetBSD: rndpool.h,v 1.3 2015/04/14 13:14:20 riastradh Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -56,6 +56,11 @@
uint32_t pool[RND_POOLWORDS]; /* random pool data */
} rndpool_t;
+/* Mode for rnd_extract_data. */
+#define RND_EXTRACT_ANY 0 /* extract as many bits as requested */
+#define RND_EXTRACT_GOOD 1 /* extract as many bits as we have counted
+ * entropy */
+
void rndpool_init(rndpool_t *);
uint32_t rndpool_get_entropy_count(rndpool_t *);
void rndpool_set_entropy_count(rndpool_t *, uint32_t);
Home |
Main Index |
Thread Index |
Old Index