public class RandomCreatorImpl extends Object implements RandomCreator
RandomCreator.| Modifier and Type | Field and Description |
|---|---|
private int |
count |
private int |
reseedCount |
private SecureRandom |
secureRandom |
RANDOM_ALGORITHM_SHA1_PRNG| Constructor and Description |
|---|
RandomCreatorImpl(SecureRandom secureRandom,
int reseedCount)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAlgorithm() |
byte[] |
nextRandom(int bytes) |
private final SecureRandom secureRandom
private final int reseedCount
private int count
public RandomCreatorImpl(SecureRandom secureRandom, int reseedCount)
secureRandom - the underlying SecureRandom.reseedCount - the
re-seed
count.public String getAlgorithm()
getAlgorithm in interface CryptoAlgorithmKey.getAlgorithm(),
Signature.getAlgorithm(),
MessageDigest.getAlgorithm(),
SecureRandom.getAlgorithm(),
Cipher.getAlgorithm()public byte[] nextRandom(int bytes)
nextRandom in interface RandomCreatorbytes - the requested number of random bytes.byte array with the given number of random bytes.SecureRandom.nextBytes(byte[])Copyright © 2001–2019 mmm-Team. All rights reserved.