Package java.security
Class SecureRandomSpi
- java.lang.Object
-
- java.security.SecureRandomSpi
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
OpenSSLRandom
public abstract class SecureRandomSpi extends Object implements Serializable
SecureRandomSpiis the Service Provider Interface (SPI) definition forSecureRandom.- See Also:
SecureRandom, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SecureRandomSpi()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract byte[]engineGenerateSeed(int numBytes)Generates and returns the specified number of seed bytes, computed using the seed generation algorithm used by thisSecureRandomSpi.protected abstract voidengineNextBytes(byte[] bytes)Generates and stores random bytes in the givenbyte[]for each array element.protected abstract voidengineSetSeed(byte[] seed)Reseeds thisSecureRandomSpiinstance with the specifiedseed.
-
-
-
Method Detail
-
engineSetSeed
protected abstract void engineSetSeed(byte[] seed)
Reseeds thisSecureRandomSpiinstance with the specifiedseed. The seed of thisSecureRandomSpiinstance is supplemented, not replaced.- Parameters:
seed- the new seed.
-
engineNextBytes
protected abstract void engineNextBytes(byte[] bytes)
Generates and stores random bytes in the givenbyte[]for each array element.- Parameters:
bytes- thebyte[]to be filled with random bytes.
-
engineGenerateSeed
protected abstract byte[] engineGenerateSeed(int numBytes)
Generates and returns the specified number of seed bytes, computed using the seed generation algorithm used by thisSecureRandomSpi.- Parameters:
numBytes- the number of seed bytes.- Returns:
- the seed bytes
-
-