webfunds.utils
Class SecureRandomHack

java.lang.Object
  |
  +--webfunds.utils.SecureRandomHack

public final class SecureRandomHack
extends java.lang.Object

This class is a hack to speed up SecureRandom initialization, working around JDK 1.1 brain damage. This class should disappear when we drop JDK 1.1.x support. Just call it before you call your first SecureRandom() constructor. This will only improve speed on UN*X, Windows and Mac don't have a /dev/random nor something equivalent.


Method Summary
static java.security.SecureRandom getInstance()
          Get a SecureRandom object that has been initialized a quickly as possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static java.security.SecureRandom getInstance()
Get a SecureRandom object that has been initialized a quickly as possible. On Mac and Windows this uses the default SecureRandom emtpy constructor but on UNIX it quickly initialized from /dev/random.