Build 1.0_r1(from source)

javax.crypto
Class KeyAgreement

java.lang.Object
  extended by javax.crypto.KeyAgreement

public class KeyAgreement
extends Object


Constructor Summary
protected KeyAgreement(KeyAgreementSpi keyAgreeSpi, Provider provider, String algorithm)
           
 
Method Summary
 Key doPhase(Key key, boolean lastPhase)
           
 byte[] generateSecret()
           
 int generateSecret(byte[] sharedSecret, int offset)
           
 SecretKey generateSecret(String algorithm)
           
 String getAlgorithm()
           
static KeyAgreement getInstance(String algorithm)
           
static KeyAgreement getInstance(String algorithm, Provider provider)
           
static KeyAgreement getInstance(String algorithm, String provider)
           
 Provider getProvider()
           
 void init(Key key)
           
 void init(Key key, AlgorithmParameterSpec params)
           
 void init(Key key, AlgorithmParameterSpec params, SecureRandom random)
           
 void init(Key key, SecureRandom random)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyAgreement

protected KeyAgreement(KeyAgreementSpi keyAgreeSpi,
                       Provider provider,
                       String algorithm)
Method Detail

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

Build 1.0_r1(from source)

Please submit a feedback, bug or feature