summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorCasey Marshall <csm@gnu.org>2006-04-12 18:09:01 +0000
committerCasey Marshall <csm@gnu.org>2006-04-12 18:09:01 +0000
commit4f4549b2b2c958da7f738e720b9f0e2931b6ccd4 (patch)
treecfa62abe7aa597ba53b36da83283e8fd1e301947 /gnu
parentdd93620f0f1a0eaf0186990bb5e429b1d6cc5c6b (diff)
downloadclasspath-4f4549b2b2c958da7f738e720b9f0e2931b6ccd4.tar.gz
2006-04-12 Casey Marshall <csm@gnu.org>
* gnu/javax/crypto/prng/Fortuna.java (setup): call `fillBlock.' (Generator.setup): call `fillBlock.'
Diffstat (limited to 'gnu')
-rw-r--r--gnu/javax/crypto/prng/Fortuna.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/javax/crypto/prng/Fortuna.java b/gnu/javax/crypto/prng/Fortuna.java
index 6453a9d02..69ce860f4 100644
--- a/gnu/javax/crypto/prng/Fortuna.java
+++ b/gnu/javax/crypto/prng/Fortuna.java
@@ -142,6 +142,14 @@ public class Fortuna extends BasePRNG implements Serializable,
pool = 0;
pool0Count = 0;
generator.init(attributes);
+ try
+ {
+ fillBlock ();
+ }
+ catch (LimitReachedException shouldNotHappen)
+ {
+ throw new RuntimeException (shouldNotHappen);
+ }
}
public void fillBlock() throws LimitReachedException
@@ -324,6 +332,7 @@ public class Fortuna extends BasePRNG implements Serializable,
byte[] seed = (byte[]) attributes.get(SEED);
if (seed != null)
addRandomBytes(seed);
+ fillBlock ();
}
/**