Ejemplo n.º 1
0
 /**
  * Reseeds this random object. The given seed supplements, rather than replaces, the existing
  * seed.
  *
  * @param seed The seed.
  */
 public void engineSetSeed(byte[] seed) {
   this.isaac.supplementSeed(ISAACEngine.packToIntArray(seed));
 }
Ejemplo n.º 2
0
 /**
  * Creates a new instance and seeds it with random data obtained from <code>
  * java.security.SecureRandom</code>'s <code>getSeed()</code> method.
  */
 public ISAACEngine() {
   byte[] temp = new byte[1024]; // SecureRandom.getSeed (1024);
   new SecureRandom().nextBytes(temp);
   this.isaac = new ISAACAlgorithm(ISAACEngine.packToIntArray(temp));
 }