|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.RandomUtils
public class RandomUtils
Utility class that supports random and secure random functions. In some systems SecureRandom initialization is very slow, a workaround is implemented here.
Method Summary | |
---|---|
static byte[] |
getSecureBytes(int len)
Get a number of cryptographically secure pseudo random bytes. |
static long |
getSecureLong()
Get a cryptographically secure pseudo random long value. |
static int |
nextInt(int lowerThan)
Get a pseudo random int value between 0 (including and the given value (excluding). |
static int |
nextSecureInt(int lowerThan)
Get a cryptographically secure pseudo random int value between 0 (including and the given value (excluding). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static long getSecureLong()
public static byte[] getSecureBytes(int len)
len
- the number of bytes
public static int nextInt(int lowerThan)
lowerThan
- the value returned will be lower than this value
public static int nextSecureInt(int lowerThan)
lowerThan
- the value returned will be lower than this value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |