com.atlassian.security.random
Class SecureRandomFactory
java.lang.Object
com.atlassian.security.random.SecureRandomFactory
public final class SecureRandomFactory
- extends Object
A factory which returns properly initialised instances of SecureRandom.
Clients should not access this class directly, but instead use SecureRandomService
or SecureTokenGenerator for their random data generation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newInstance
public static SecureRandom newInstance()
- Creates and fully initialises a new
SecureRandom instance.
The instance is created via SecureRandom.SecureRandom(), which uses the default algorithm
provided by the JVM.
The initialisation involves forcing the self-seeding of the instance by calling
SecureRandom.nextBytes(byte[]).
- Returns:
- self-seeded
SecureRandom instance.
Copyright © 2013 Atlassian. All rights reserved.