Skip to Content
Java Security
book

Java Security

by Scott Oaks
May 1998
Intermediate to advanced
469 pages
14h 57m
English
O'Reilly Media, Inc.
Content preview from Java Security

Name

Class javax.crypto.KeyGenerator

Synopsis

A key generator creates secret keys for use with symmetric ciphers. Key generators are obtained by calling the getInstance() method; they must then be initialized with an init() method. The key itself is then returned from the generateSecret() method.

Class Definition

public class javax.crypto.KeyGenerator
	extends java.lang.Object {

	// Constructors
	protected KeyGenerator(KeyGeneratorSpi, Provider, String);

	// Class Methods
	public static final KeyGenerator getInstance(String);
	public static final KeyGenerator getInstance(String, String);

	// Instance Methods
	public final SecretKey generateKey();
	public final String getAlgorithm();
	public final Provider getProvider();
	public final void init(int);
	public final void init(int, SecureRandom);
	public final void init(SecureRandom);
	public final void init(AlgorithmParameterSpec);
	public final void init(AlgorithmParameterSpec, SecureRandom);
}

See also:

AlgorithmParameterSpec, KeyGeneratorSpi, Provider, SecretKey, SecureRandom

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Security Handbook

Java Security Handbook

Jamie Jaworski, Paul J. Perrone, Venkata S.R. Krishna Chaganti

Publisher Resources

ISBN: 1565924037Supplemental ContentCatalog PageErrata