Name
Class javax.crypto.KeyAgreement
Description
This 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
getInstance()
. Once the
KeyAgreement
is initialized (see
init()
), you can step through the phases of the
key agreement protocol using doPhase()
. Once the
phases are complete, the secret value is returned from
generateSecret()
.
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 SecretKey generateSecret(String); 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
Get Java Cryptography 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.