diff options
author | Matt Johnston <matt@ucc.asn.au> | 2007-01-11 02:39:21 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2007-01-11 02:39:21 +0000 |
commit | 28ad393b008b34bc3cdbaa192440b8cc615329f0 (patch) | |
tree | 00fcfa9acba720e69b2665fd48d8744822f1f0fb /src/headers/tomcrypt_prng.h | |
parent | 33defd1f9b6c4889fe5b075e6abb0b24c00f3a59 (diff) | |
parent | f3b834d5366011e1e4b340c7acdbd582c7e50689 (diff) |
propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
to branch 'au.asn.ucc.matt.ltc.dropbear' (head 20dccfc09627970a312d77fb41dc2970b62689c3)
--HG--
branch : libtomcrypt-dropbear
extra : convert_revision : 2af22fb4e878750b88f80f90d439b316d229796f
Diffstat (limited to 'src/headers/tomcrypt_prng.h')
-rw-r--r-- | src/headers/tomcrypt_prng.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/headers/tomcrypt_prng.h b/src/headers/tomcrypt_prng.h index f96d408..dd640c9 100644 --- a/src/headers/tomcrypt_prng.h +++ b/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 $ */ |