JavaDoc for this project can be found here.
Good cryptography needs securely generated random numbers. Java does not provide a random number generator that meets the needs of modern strong cryptography. This library fixes that.
Read the installation instructions. Use it.
To use this library in an application, you should do one of the following:
SecureRandom rand = new SecureRandom("Nist-SHA256",new prng.SecureRandomProvider());
prng.SecureRandomProvider.install(true);
Installs the secure random provider as the default secure random provider, so calls to new SecureRandom() will use on of its algorithms.
java -javaagent:prng-1.0.0.jar ...rest of command line
Install the secure random provider and the default secure random number generator implementation prior to invoking the application's main method.
The provider may be made a standard provider for all applications using a given Java Runtime Environment.
- Copy
prng-1.0.0.jar
to[java home]/jre/lib/ext
- Open the file
[java home]/jre/lib/security/java.security
in a text editor. - Add a line such as:
security.provider.1=prng.SecureRandomProvider
- Adjust all the other
security.provider.N
entries so each one has a unique name with the order you desire - Save the file