javax.crypto
Class KeyAgreement
java.lang.Object
javax.crypto.KeyAgreement
public class KeyAgreement
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeyAgreement
protected KeyAgreement(KeyAgreementSpi keyAgreeSpi,
Provider provider,
String algorithm)
getAlgorithm
public final String getAlgorithm()
getProvider
public final Provider getProvider()
getInstance
public static final KeyAgreement getInstance(String algorithm)
throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
getInstance
public static final KeyAgreement getInstance(String algorithm,
String provider)
throws NoSuchAlgorithmException,
NoSuchProviderException
- Throws:
NoSuchAlgorithmException
NoSuchProviderException
getInstance
public static final KeyAgreement getInstance(String algorithm,
Provider provider)
throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
init
public final void init(Key key)
throws InvalidKeyException
- Throws:
InvalidKeyException
init
public final void init(Key key,
SecureRandom random)
throws InvalidKeyException
- Throws:
InvalidKeyException
init
public final void init(Key key,
AlgorithmParameterSpec params)
throws InvalidKeyException,
InvalidAlgorithmParameterException
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
init
public final void init(Key key,
AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidKeyException,
InvalidAlgorithmParameterException
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
doPhase
public final Key doPhase(Key key,
boolean lastPhase)
throws InvalidKeyException,
IllegalStateException
- Throws:
InvalidKeyException
IllegalStateException
generateSecret
public final byte[] generateSecret()
throws IllegalStateException
- Throws:
IllegalStateException
generateSecret
public final int generateSecret(byte[] sharedSecret,
int offset)
throws IllegalStateException,
ShortBufferException
- Throws:
IllegalStateException
ShortBufferException
generateSecret
public final SecretKey generateSecret(String algorithm)
throws IllegalStateException,
NoSuchAlgorithmException,
InvalidKeyException
- Throws:
IllegalStateException
NoSuchAlgorithmException
InvalidKeyException
Please submit a feedback, bug or feature