Package org.web3j.crypto
Class LinuxSecureRandom
java.lang.Object
java.security.SecureRandomSpi
org.web3j.crypto.LinuxSecureRandom
- All Implemented Interfaces:
Serializable
Implementation from BitcoinJ
implementation
A SecureRandom implementation that is able to override the standard JVM provided implementation, and which simply serves random numbers by reading /dev/urandom. That is, it delegates to the kernel on UNIX systems and is unusable on other platforms. Attempts to manually set the seed are ignored. There is no difference between seed bytes and non-seed bytes, they are all from the same source.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]engineGenerateSeed(int i) protected voidengineNextBytes(byte[] bytes) protected voidengineSetSeed(byte[] bytes) Methods inherited from class java.security.SecureRandomSpi
engineGetParameters, engineNextBytes, engineReseed, toString
-
Constructor Details
-
LinuxSecureRandom
public LinuxSecureRandom()
-
-
Method Details
-
engineSetSeed
protected void engineSetSeed(byte[] bytes) - Specified by:
engineSetSeedin classSecureRandomSpi
-
engineNextBytes
protected void engineNextBytes(byte[] bytes) - Specified by:
engineNextBytesin classSecureRandomSpi
-
engineGenerateSeed
protected byte[] engineGenerateSeed(int i) - Specified by:
engineGenerateSeedin classSecureRandomSpi
-