Package org.bouncycastle.crypto.prng
Class FixedSecureRandom
- java.lang.Object
-
- java.util.Random
-
- java.security.SecureRandom
-
- org.bouncycastle.crypto.prng.FixedSecureRandom
-
- All Implemented Interfaces:
java.io.Serializable
public class FixedSecureRandom extends java.security.SecureRandom
A secure random that returns pre-seeded data to calls of nextBytes() or generateSeed().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FixedSecureRandom(boolean intPad, byte[] value)
Pad the data on integer boundaries.FixedSecureRandom(boolean intPad, byte[][] values)
Pad the data on integer boundaries.FixedSecureRandom(byte[] value)
FixedSecureRandom(byte[][] values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
generateSeed(int numBytes)
boolean
isExhausted()
void
nextBytes(byte[] bytes)
int
nextInt()
long
nextLong()
-
Methods inherited from class java.security.SecureRandom
getAlgorithm, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, reseed, reseed, setSeed, setSeed, toString
-
-
-
-
Constructor Detail
-
FixedSecureRandom
public FixedSecureRandom(byte[] value)
-
FixedSecureRandom
public FixedSecureRandom(byte[][] values)
-
FixedSecureRandom
public FixedSecureRandom(boolean intPad, byte[] value)
Pad the data on integer boundaries. This is necessary for the classpath project's BigInteger implementation.
-
FixedSecureRandom
public FixedSecureRandom(boolean intPad, byte[][] values)
Pad the data on integer boundaries. This is necessary for the classpath project's BigInteger implementation.
-
-
Method Detail
-
nextBytes
public void nextBytes(byte[] bytes)
- Overrides:
nextBytes
in classjava.security.SecureRandom
-
generateSeed
public byte[] generateSeed(int numBytes)
- Overrides:
generateSeed
in classjava.security.SecureRandom
-
nextInt
public int nextInt()
- Overrides:
nextInt
in classjava.util.Random
-
nextLong
public long nextLong()
- Overrides:
nextLong
in classjava.util.Random
-
isExhausted
public boolean isExhausted()
-
-