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) doublefloatintnextInt()intnextInt(int n) longnextLong()voidreseed()voidsetSeed(byte[] seed) voidsetSeed(long seed) Methods inherited from class org.teavm.classlib.java.util.TRandom
nextGaussianMethods inherited from class org.teavm.classlib.java.lang.TObject
clone, equals, equals0, finalize, getClass0, hashCode, notify0, notifyAll0, toString, wait0, wait0, waitImplMethods 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(long seed) -
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
-
nextInt
public int nextInt(int n) - Specified by:
nextIntin interfaceTRandomGenerator- Overrides:
nextIntin classTRandom
-
nextLong
public long nextLong()- Specified by:
nextLongin interfaceTRandomGenerator- Overrides:
nextLongin classTRandom
-
nextFloat
public float nextFloat()- Specified by:
nextFloatin interfaceTRandomGenerator- Overrides:
nextFloatin 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)
-