| |
|
| java.lang.Object java.util.Random java.security.SecureRandom
SecureRandom | public SecureRandom()(Code) | | Constructs a new instance of this class. Users are encouraged to use
getInstance() instead.
An implementation for the highest-priority provider is returned. The
instance returned will not have been seeded.
|
SecureRandom | public SecureRandom(byte[] seed)(Code) | | Constructs a new instance of this class. Users are encouraged to use
getInstance() instead.
An implementation for the highest-priority provider is returned. The
instance returned will be seeded with the parameter.
Parameters: seed - bytes forming the seed for this generator. |
generateSeed | public byte[] generateSeed(int numBytes)(Code) | | Generates a certain number of seed bytes
Parameters: numBytes - int Number of seed bytes to generate byte[] The seed bytes generated |
getInstance | public static SecureRandom getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException(Code) | | Answers a new SecureRandom which is capable of running the algorithm
described by the argument. The result will be an instance of a subclass
of SecureRandomSpi which implements that algorithm.
Parameters: algorithm - java.lang.String Name of the algorithm desired Parameters: provider - java.security.Provider Provider which has to implement thealgorithm SecureRandom a concrete implementation for the algorithm desired. exception: NoSuchAlgorithmException - If the algorithm cannot be found |
getProvider | final public Provider getProvider()(Code) | | Returns the Provider of the secure random represented by the receiver.
Provider an instance of a subclass of java.security.Provider |
getSeed | public static byte[] getSeed(int numBytes)(Code) | | Returns the given number of seed bytes, computed using the seed
generation algorithm used by this class.
Parameters: numBytes - int the given number of seed bytes byte[] The seed bytes generated |
next | final protected int next(int numBits)(Code) | | |
nextBytes | public synchronized void nextBytes(byte[] bytes)(Code) | | |
setSeed | public synchronized void setSeed(byte[] seed)(Code) | | |
setSeed | public void setSeed(long seed)(Code) | | Reseeds this random object with the eight bytes described by the
representation of the long provided.
Parameters: seed - long Number whose representation to use to reseed thereceiver. |
|
|
|