Package org.teavm.classlib.java.security
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 org.teavm.classlib.java.util.TRandom
nextFloat, nextGaussian, nextInt, nextLong, setSeedMethods inherited from class org.teavm.classlib.java.lang.TObject
clone, equals, equals0, finalize, getClass0, hashCode, notify0, notifyAll0, toString, wait0, wait0Methods inherited from interface org.teavm.classlib.java.util.random.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)
-