Package com.google.crypto.tink.internal
Class Random
- java.lang.Object
-
- com.google.crypto.tink.internal.Random
-
public final class Random extends java.lang.ObjectProvides secure randomness usingSecureRandom.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]randBytes(int size)Returns a random byte array of sizesize.static intrandInt()static intrandInt(int max)static voidvalidateUsesConscrypt()Throws a GeneralSecurityException if the provider is not Conscrypt.
-
-
-
Method Detail
-
randBytes
public static byte[] randBytes(int size)
Returns a random byte array of sizesize.
-
randInt
public static final int randInt(int max)
-
randInt
public static final int randInt()
-
validateUsesConscrypt
public static final void validateUsesConscrypt() throws java.security.GeneralSecurityExceptionThrows a GeneralSecurityException if the provider is not Conscrypt.- Throws:
java.security.GeneralSecurityException
-
-