Package org.bouncycastle.crypto.fips
Class FipsSecureRandom
- java.lang.Object
-
- java.util.Random
-
- java.security.SecureRandom
-
- org.bouncycastle.crypto.fips.FipsSecureRandom
-
- All Implemented Interfaces:
java.io.Serializable
public final class FipsSecureRandom extends java.security.SecureRandom
Base class for DRBG/RNG SecureRandom implementations that use FIPS approved algorithms.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBlockSize()
Return the block size of the underlying DRBGint
getSecurityStrength()
Return the security strength of the DRBG.void
nextBytes(byte[] bytes, byte[] additionalInput)
void
reseed()
Force a reseed.void
reseed(byte[] additionalInput)
Force a reseed with additional input.void
setSeed(long seed)
-
Methods inherited from class java.security.SecureRandom
generateSeed, getAlgorithm, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, nextBytes, reseed, setSeed, toString
-
-
-
-
Method Detail
-
setSeed
public void setSeed(long seed)
- Overrides:
setSeed
in classjava.security.SecureRandom
-
nextBytes
public void nextBytes(byte[] bytes, byte[] additionalInput)
-
getBlockSize
public int getBlockSize()
Return the block size of the underlying DRBG- Returns:
- number of bits produced each cycle.
-
getSecurityStrength
public int getSecurityStrength()
Return the security strength of the DRBG.- Returns:
- the security strength (in bits) of the DRBG.
-
reseed
public void reseed()
Force a reseed.- Overrides:
reseed
in 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.
-
-