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 KeyPairGenerator

Synopsis

This is an engine class that is capable of generating a public key and its related private key. Instances of this class will generate key pairs that are appropriate for a particular algorithm (DSA, RSA, etc.). A key pair generator may be initialized to return keys of a particular strength (which is usually the number of bits in the key), or it may be initialized in an algorithmic-specific way; the former case is the one implemented by most key generators. An instance of this class may be used to generate any number of key pairs.

Class Definition

public abstract class java.security.KeyPairGenerator
	extends java.security.KeyPairGeneratorSpi {

	// Constructors
	protected KeyPairGenerator(String);

	// Class Methods
	public static KeyPairGenerator getInstance(String);
	public static KeyPairGenerator getInstance(String, String);

	// Instance Methods
	public final KeyPair genKeyPair();
	public String getAlgorithm();
	public final Provider getProvider();
	public void initialize(int);
	public void initialize(int, SecureRandom)
	public void initialize(AlgorithmParameterSpec, SecureRandom);
	public void initialize(AlgorithmParameterSpec);
}

See also:

AlgorithmParameterSpec, KeyPair

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