Package org.apache.wicket.core.random
Class DefaultSecureRandomSupplier
- java.lang.Object
-
- org.apache.wicket.core.random.DefaultSecureRandomSupplier
-
- All Implemented Interfaces:
ISecureRandomSupplier
public class DefaultSecureRandomSupplier extends Object implements ISecureRandomSupplier
A very simpleISecureRandomSupplier
that holds aSecureRandom
usingSHA1PRNG
. ThisSecureRandom
is strong enough for generation of nonces with a short lifespan, but might not be strong enough for generating long-lived keys. When your application has stronger requirements on the random implementation, you should replace this class by your own implementation.- Author:
- papegaaij
-
-
Constructor Summary
Constructors Constructor Description DefaultSecureRandomSupplier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecureRandom
getRandom()
Returns the actualSecureRandom
being used as source.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.core.random.ISecureRandomSupplier
getRandomBase64, getRandomBytes
-
-
-
-
Constructor Detail
-
DefaultSecureRandomSupplier
public DefaultSecureRandomSupplier()
-
-
Method Detail
-
getRandom
public SecureRandom getRandom()
Description copied from interface:ISecureRandomSupplier
Returns the actualSecureRandom
being used as source.- Specified by:
getRandom
in interfaceISecureRandomSupplier
- Returns:
- The
SecureRandom
.
-
-