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();
	public SecureRandom(byte[]);

	// Class Methods
	public static byte[] getSeed(int);

	// Instance Methods
	public synchronized void nextBytes(byte[]);
	public void setSeed(long);
	public synchronized void setSeed(byte[]);

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

Get Java Security 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.