summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/headers/tomcrypt_prng.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2007-02-22 14:53:49 +0000
committerMatt Johnston <matt@ucc.asn.au>2007-02-22 14:53:49 +0000
commitb01a74a9d757ce2b83465214bde1fa07d3e2d3ea (patch)
tree092cac6797947f7b23fcdcc2c081b19c390c5bc4 /libtomcrypt/src/headers/tomcrypt_prng.h
parent66643fa5c723da2dc781c5eeae2e008c280a7b1c (diff)
parent7f12251fbb2acefac04e13a7c6a95ca4dd4b5578 (diff)
merge of 'a9b0496634cdd25647b65e585cc3240f3fa699ee'
and 'c22be8b8f570b48e9662dac32c7b3e7148a42206' --HG-- extra : convert_revision : 066f6aef2791d54b9ec6a0c3033fd28fa946251f
Diffstat (limited to 'libtomcrypt/src/headers/tomcrypt_prng.h')
-rw-r--r--libtomcrypt/src/headers/tomcrypt_prng.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt_prng.h b/libtomcrypt/src/headers/tomcrypt_prng.h
index f96d408..dd640c9 100644
--- a/libtomcrypt/src/headers/tomcrypt_prng.h
+++ b/libtomcrypt/src/headers/tomcrypt_prng.h
@@ -4,6 +4,7 @@ struct yarrow_prng {
int cipher, hash;
unsigned char pool[MAXBLOCKSIZE];
symmetric_CTR ctr;
+ LTC_MUTEX_TYPE(prng_lock)
};
#endif
@@ -28,6 +29,7 @@ struct fortuna_prng {
wd;
ulong64 reset_cnt; /* number of times we have reset */
+ LTC_MUTEX_TYPE(prng_lock)
};
#endif
@@ -46,6 +48,7 @@ struct sober128_prng {
#endif
typedef union Prng_state {
+ char dummy[1];
#ifdef YARROW
struct yarrow_prng yarrow;
#endif
@@ -60,6 +63,7 @@ typedef union Prng_state {
#endif
} prng_state;
+/** PRNG descriptor */
extern struct ltc_prng_descriptor {
/** Name of the PRNG */
char *name;
@@ -178,7 +182,7 @@ int find_prng(const char *name);
int register_prng(const struct ltc_prng_descriptor *prng);
int unregister_prng(const struct ltc_prng_descriptor *prng);
int prng_is_valid(int idx);
-LTC_MUTEX_PROTO(ltc_prng_mutex);
+LTC_MUTEX_PROTO(ltc_prng_mutex)
/* Slow RNG you **might** be able to use to seed a PRNG with. Be careful as this
* might not work on all platforms as planned
@@ -191,5 +195,5 @@ int rng_make_prng(int bits, int wprng, prng_state *prng, void (*callback)(void))
/* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_prng.h,v $ */
-/* $Revision: 1.3 $ */
-/* $Date: 2005/06/19 18:00:28 $ */
+/* $Revision: 1.8 $ */
+/* $Date: 2006/11/05 01:36:43 $ */