public class SecureRandom extends Random
Modifier | Constructor and Description |
---|---|
|
SecureRandom() |
|
SecureRandom(byte[] seed) |
protected |
SecureRandom(SecureRandomSpi secureRandomSpi,
Provider provider) |
Modifier and Type | Method and Description |
---|---|
byte[] |
generateSeed(int numBytes) |
static SecureRandom |
getInstance(String algorithm) |
static SecureRandom |
getInstance(String algorithm,
Provider provider) |
static SecureRandom |
getInstance(String algorithm,
String provider) |
Provider |
getProvider() |
static byte[] |
getSeed(int numBytes) |
protected int |
next(int numBits) |
void |
nextBytes(byte[] bytes) |
void |
setSeed(byte[] seed) |
void |
setSeed(long seed) |
nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
public SecureRandom()
public SecureRandom(byte[] seed)
protected SecureRandom(SecureRandomSpi secureRandomSpi, Provider provider)
public static SecureRandom getInstance(String algorithm) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static SecureRandom getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
public static SecureRandom getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static byte[] getSeed(int numBytes)
public byte[] generateSeed(int numBytes)
public final Provider getProvider()
public void setSeed(byte[] seed)