JML

java.security
Class SecureRandom

java.lang.Object
  extended byjava.util.Random
      extended byjava.security.SecureRandom
All Implemented Interfaces:
Serializable

public class SecureRandom
extends Random


Model Field Summary
 
Model fields inherited from class java.lang.Object
_getClass, objectState, theString
 
Ghost Field Summary
 
Ghost fields inherited from class java.lang.Object
objectTimesFinalized, owner
 
Field Summary
private  long counter
           
private  MessageDigest digest
           
private  Provider provider
           
private  byte[] randomBytes
           
private  int randomBytesUsed
           
private  SecureRandomSpi secureRandomSpi
           
private static SecureRandom seedGenerator
           
(package private) static long serialVersionUID
           
private  byte[] state
           
 
Fields inherited from class java.util.Random
 
Constructor Summary
  SecureRandom()
           
  SecureRandom(byte[])
           
protected SecureRandom(SecureRandomSpi, Provider)
           
 
Model Method Summary
 
Model methods inherited from class java.lang.Object
hashValue
 
Method Summary
 byte[] generateSeed(int)
           
static SecureRandom getInstance(String)
           
static SecureRandom getInstance(String, String)
           
static SecureRandom getInstance(String, Provider)
           
private static String getPrngAlgorithm()
           
 Provider getProvider()
           
(package private)  SecureRandomSpi getSecureRandomSpi()
           
static byte[] getSeed(int)
           
private static byte[] longToByteArray(long)
           
protected  int next(int)
           
 void nextBytes(byte[])
           
 void setSeed(byte[])
           
 void setSeed(long)
           
 
Methods inherited from class java.util.Random
nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

counter

private long counter

randomBytes

private byte[] randomBytes

state

private byte[] state

serialVersionUID

static final long serialVersionUID

seedGenerator

private static SecureRandom seedGenerator

digest

private MessageDigest digest

randomBytesUsed

private int randomBytesUsed

provider

private Provider provider

secureRandomSpi

private SecureRandomSpi secureRandomSpi
Constructor Detail

SecureRandom

public SecureRandom()

SecureRandom

public SecureRandom(byte[])

SecureRandom

protected SecureRandom(SecureRandomSpi,
                       Provider)
Method Detail

next

protected final int next(int)
Overrides:
next in class Random

generateSeed

public byte[] generateSeed(int)

getSeed

public static byte[] getSeed(int)

setSeed

public void setSeed(long)
Overrides:
setSeed in class Random

longToByteArray

private static byte[] longToByteArray(long)

nextBytes

public void nextBytes(byte[])
Overrides:
nextBytes in class Random

setSeed

public void setSeed(byte[])

getPrngAlgorithm

private static String getPrngAlgorithm()

getProvider

public final Provider getProvider()

getSecureRandomSpi

SecureRandomSpi getSecureRandomSpi()

getInstance

public static SecureRandom getInstance(String)
                                throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

getInstance

public static SecureRandom getInstance(String,
                                       String)
                                throws NoSuchAlgorithmException,
                                       NoSuchProviderException
Throws:
NoSuchAlgorithmException
NoSuchProviderException

getInstance

public static SecureRandom getInstance(String,
                                       Provider)
                                throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.