Name

Class java.security.SecureRandom

Synopsis

This class generates random numbers. Unlike the standard random-number generator, numbers generated by this class are cryptographically secure -- that is, they are less subject to pattern guessing and other attacks that can be made upon a traditional random-number generator.

Class Definition

public class java.security.SecureRandom
    extends java.util.Random {

    // Constructors
    public SecureRandom(byte[]);
    protected SecureRandom(SecureRandomSpi, Provider);
    public SecureRandom(  );

    // Class Methods
    public static SecureRandom getInstance(String, String);
    public static SecureRandom getInstance(String);
    public static byte[] getSeed(int);

    // Instance Methods
    public byte[] generateSeed(int);
    public final Provider getProvider(  );
    public synchronized void nextBytes(byte[]);
    public synchronized void setSeed(byte[]);
    public void setSeed(long);

    // Protected Instance Methods
    protected final int next(int);
}

Get Java Security, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.