org.apache.xml.security.utils
Class PRNG
java.lang.Object
org.apache.xml.security.utils.PRNG
- public class PRNG
- extends java.lang.Object
Singleton for an application-wide SecureRandom
.
- Author:
- $Author: raul $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
init
public static void init(java.security.SecureRandom secureRandom)
- Parameters:
secureRandom
-
getInstance
public static PRNG getInstance()
- Returns:
getSecureRandom
public java.security.SecureRandom getSecureRandom()
- Returns:
createBytes
public static byte[] createBytes(int length)
- Parameters:
length
-
- Returns:
nextBytes
public void nextBytes(byte[] bytes)
- Parameters:
bytes
-
nextDouble
public double nextDouble()
- Returns:
nextInt
public int nextInt()
- Returns:
nextInt
public int nextInt(int i)
- Parameters:
i
-
- Returns:
nextBoolean
public boolean nextBoolean()
- Returns: