Exemplo n.º 1
0
 /**
  * Returns the SecureRandom used to generate secure random data.
  *
  * <p>Creates and initializes if null. Uses {@code System.currentTimeMillis() +
  * System.identityHashCode(this)} as the default seed.
  *
  * @return the SecureRandom used to generate secure random data, wrapped in a {@link
  *     RandomGenerator}.
  */
 private RandomGenerator getSecRan() {
   if (secRand == null) {
     secRand = RandomGeneratorFactory.createRandomGenerator(new SecureRandom());
     secRand.setSeed(System.currentTimeMillis() + System.identityHashCode(this));
   }
   return secRand;
 }