Class TSecureRandom
java.lang.Object
org.teavm.classlib.java.lang.TObject
org.teavm.classlib.java.util.TRandom
org.teavm.classlib.java.security.TSecureRandom
- All Implemented Interfaces:
TSerializable, TRandomGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generateSeed(int numBytes) static TSecureRandomgetInstance(String algorithm) static byte[]getSeed(int numBytes) protected intnext(int bits) voidnextBytes(byte[] bytes) doubleintnextInt()voidreseed()voidsetSeed(byte[] seed) Methods inherited from class TObject
clone, equals, equals0, finalize, getClass0, hashCode, notify0, notifyAll0, toString, wait0, wait0Methods inherited from interface TRandomGenerator
doubles, doubles, doubles, doubles, ints, ints, ints, ints, isDeprecated, longs, longs, longs, longs, nextBoolean, nextDouble, nextDouble, nextFloat, nextFloat, nextGaussian, nextInt, nextLong, nextLong
-
Constructor Details
-
TSecureRandom
public TSecureRandom() -
TSecureRandom
public TSecureRandom(byte[] seed)
-
-
Method Details
-
getInstance
- Throws:
TNoSuchAlgorithmException
-
getAlgorithm
-
setSeed
public void setSeed(byte[] seed) -
reseed
public void reseed() -
next
protected int next(int bits) -
nextBytes
public void nextBytes(byte[] bytes) -
nextInt
public int nextInt()- Specified by:
nextIntin interfaceTRandomGenerator- Overrides:
nextIntin classTRandom
-
nextDouble
public double nextDouble()- Specified by:
nextDoublein interfaceTRandomGenerator- Overrides:
nextDoublein classTRandom
-
getSeed
public static byte[] getSeed(int numBytes) -
generateSeed
public byte[] generateSeed(int numBytes)
-