diff options
Diffstat (limited to 'libjava/classpath/gnu/javax/crypto/prng/Fortuna.java')
-rw-r--r-- | libjava/classpath/gnu/javax/crypto/prng/Fortuna.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libjava/classpath/gnu/javax/crypto/prng/Fortuna.java b/libjava/classpath/gnu/javax/crypto/prng/Fortuna.java index 6453a9d02d0..69ce860f451 100644 --- a/libjava/classpath/gnu/javax/crypto/prng/Fortuna.java +++ b/libjava/classpath/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 (); } /** |