O'Reilly logo

Java Security by Scott Oaks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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);
}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required