Package org.apache.solr.util
Class NotSecurePseudoRandomSpi
- java.lang.Object
-
- java.security.SecureRandomSpi
-
- org.apache.solr.util.NotSecurePseudoRandomSpi
-
- All Implemented Interfaces:
Serializable
public class NotSecurePseudoRandomSpi extends SecureRandomSpi
A mocked up instance of SecureRandom that just usesRandom
under the covers. This is to prevent blocking issues that arise in platform default SecureRandom instances due to too many instances / not enough random entropy. Tests do not need secure SSL.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NotSecurePseudoRandomSpi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
engineGenerateSeed(int numBytes)
protected void
engineNextBytes(byte[] bytes)
protected void
engineSetSeed(byte[] seed)
byte[]
generateSeed(int numBytes)
returns a new byte[] filled with static datavoid
nextBytes(byte[] bytes)
fills the byte[] with static datavoid
nextBytes(byte[] bytes, SecureRandomParameters params)
void
reseed()
void
reseed(SecureRandomParameters params)
void
setSeed(byte[] seed)
NOOPvoid
setSeed(long seed)
NOOP-
Methods inherited from class java.security.SecureRandomSpi
engineGetParameters, engineNextBytes, engineReseed, toString
-
-
-
-
Method Detail
-
engineSetSeed
protected void engineSetSeed(byte[] seed)
- Specified by:
engineSetSeed
in classSecureRandomSpi
-
engineNextBytes
protected void engineNextBytes(byte[] bytes)
- Specified by:
engineNextBytes
in classSecureRandomSpi
-
engineGenerateSeed
protected byte[] engineGenerateSeed(int numBytes)
- Specified by:
engineGenerateSeed
in classSecureRandomSpi
-
generateSeed
public byte[] generateSeed(int numBytes)
returns a new byte[] filled with static data
-
nextBytes
public void nextBytes(byte[] bytes)
fills the byte[] with static data
-
nextBytes
public void nextBytes(byte[] bytes, SecureRandomParameters params)
-
setSeed
public void setSeed(byte[] seed)
NOOP
-
setSeed
public void setSeed(long seed)
NOOP
-
reseed
public void reseed()
-
reseed
public void reseed(SecureRandomParameters params)
-
-