public final class SecureRandoms extends Object
| 构造器和说明 |
|---|
SecureRandoms() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
generateSeed(int numBytes) |
static boolean |
nextBoolean() |
static byte[] |
nextBytes(int numOfByte)
random byte[] array by SecureRandom
|
static double |
nextDouble() |
static float |
nextFloat() |
static int |
nextInt() |
static int |
nextInt(int bound)
returns a pseudo random int, between 0 and bound
|
static long |
nextLong() |
static BigInteger |
random(BigInteger mod)
Returns a pseudo random BigInteger, the bit length
equals mod's bit length - 1
|
static BigInteger |
random(int bitLen)
Returns a pseudo random BigInteger specified bit length
|
public static byte[] nextBytes(int numOfByte)
numOfByte - public static int nextInt(int bound)
bound - public static int nextInt()
public static long nextLong()
public static float nextFloat()
public static double nextDouble()
public static boolean nextBoolean()
public static BigInteger random(int bitLen)
bitLen - specified bit lengthpublic static BigInteger random(BigInteger mod)
mod - the modulo of maximum boundspublic static byte[] generateSeed(int numBytes)
Copyright © 2023. All rights reserved.