com.mindbright.jce.crypto
Class KeyAgreement
java.lang.Object
com.mindbright.jce.crypto.KeyAgreement
public class KeyAgreement
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keyAgreementSpi
protected KeyAgreementSpi keyAgreementSpi
KeyAgreement
protected KeyAgreement(KeyAgreementSpi keyAgreeSpi,
Provider provider,
java.lang.String algorithm)
getAlgorithm
public final java.lang.String getAlgorithm()
getInstance
public static final KeyAgreement getInstance(java.lang.String algorithm)
throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
getInstance
public static final KeyAgreement getInstance(java.lang.String algorithm,
java.lang.String provider)
throws NoSuchAlgorithmException,
NoSuchProviderException
- Throws:
NoSuchAlgorithmException
NoSuchProviderException
getProvider
public final Provider getProvider()
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,
java.lang.IllegalStateException
- Throws:
InvalidKeyException
java.lang.IllegalStateException
generateSecret
public final byte[] generateSecret()
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
generateSecret
public final int generateSecret(byte[] sharedSecret,
int offset)
throws java.lang.IllegalStateException,
ShortBufferException
- Throws:
java.lang.IllegalStateException
ShortBufferException
generateSecret
public final SecretKey generateSecret(java.lang.String algorithm)
throws java.lang.IllegalStateException,
NoSuchAlgorithmException,
InvalidKeyException
- Throws:
java.lang.IllegalStateException
NoSuchAlgorithmException
InvalidKeyException