Package org.bouncycastle.crypto.general
Class GeneralSecureRandom
- java.lang.Object
-
- java.util.Random
-
- java.security.SecureRandom
-
- org.bouncycastle.crypto.general.GeneralSecureRandom
-
- All Implemented Interfaces:
java.io.Serializable
public final class GeneralSecureRandom extends java.security.SecureRandomBase class for DRBG/RNG SecureRandom implementations that use non-FIPS approved algorithms.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]generateSeed(int numBytes)intgetBlockSize()Return the block size of the underlying DRBGvoidnextBytes(byte[] bytes)voidnextBytes(byte[] bytes, byte[] additionalInput)voidreseed()Force a reseed.voidreseed(byte[] additionalInput)Force a reseed with additional input.voidsetSeed(byte[] seed)voidsetSeed(long seed)-
Methods inherited from class java.security.SecureRandom
getAlgorithm, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, reseed, toString
-
-
-
-
Method Detail
-
setSeed
public void setSeed(byte[] seed)
- Overrides:
setSeedin classjava.security.SecureRandom
-
setSeed
public void setSeed(long seed)
- Overrides:
setSeedin classjava.security.SecureRandom
-
nextBytes
public void nextBytes(byte[] bytes)
- Overrides:
nextBytesin classjava.security.SecureRandom
-
nextBytes
public void nextBytes(byte[] bytes, byte[] additionalInput)
-
generateSeed
public byte[] generateSeed(int numBytes)
- Overrides:
generateSeedin classjava.security.SecureRandom
-
getBlockSize
public int getBlockSize()
Return the block size of the underlying DRBG- Returns:
- number of bits produced each cycle.
-
reseed
public void reseed()
Force a reseed.- Overrides:
reseedin classjava.security.SecureRandom
-
reseed
public void reseed(byte[] additionalInput)
Force a reseed with additional input.- Parameters:
additionalInput- additional input to be used in conjunction with reseed.
-
-