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.KeyAgreement

Synopsis

This engine class represents a key agreement protocol, which is an arrangement by which two parties can agree on a secret value. You can obtain an instance of this class by calling the getInstance() method. After initializing the object (see init()), you can step through the phases of the key agreement protocol using the doPhase() method. Once the phases are complete, the secret value (that is, the key) is returned from the generateSecret() method.

Class Definition

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

	// Constructors
	protected KeyAgreement(KeyAgreementSpi, Provider, String);

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

	// Instance Methods
	public final Key doPhase(Key, boolean);
	public final byte[] generateSecret();
	public final int generateSecret(byte[], int);
	public final String getAlgorithm();
	public final Provider getProvider();
	public final void init(Key);
	public final void init(Key, SecureRandom);
	public final void init(Key, AlgorithmParameterSpec);
	public final void init(Key, AlgorithmParameterSpec, SecureRandom);
}

See also:

AlgorithmParameterSpec, Key, KeyAgreementSpi, Provider, 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