Random
, ThreadLocalRandom
or
VerySecureRandom
depending on your needs.@Immutable @Deprecated public final class RandomHelper extends Object
SecureRandom
implementations on certain platforms in certain
constellations (usually on Linux with JDK 6). This class centrally allows to
decide between VerySecureRandom
and regular Random
.Modifier and Type | Method and Description |
---|---|
static Random |
getRandom()
Deprecated.
|
static SecureRandom |
getSecureRandom()
Deprecated.
|
static boolean |
isUseSecureRandom()
Deprecated.
|
static void |
setUseSecureRandom(boolean bUseSecureRandom)
Deprecated.
|
public static void setUseSecureRandom(boolean bUseSecureRandom)
public static boolean isUseSecureRandom()
@Nonnull public static Random getRandom()
SecureRandom
(if enabled) or a regular
Random
. Never null
.isUseSecureRandom()
@Nullable public static SecureRandom getSecureRandom()
SecureRandom
(if enabled) or null
.isUseSecureRandom()
Copyright © 2014–2019 Philip Helger. All rights reserved.