No examples for this method. 
     
 
     
      Frequently called with: [Clear]  
     
 
      
    
 
     
     
     -1 
    
 
     
     
   | java.lang.Object | |
| ↳ | javax.crypto.KeyAgreementSpi | 
The Service Provider Interface (SPI) definition for the KeyAgreement class. 
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Creates a new 
            KeyAgreementSpiinstance. | ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Does the next (or the last) phase of the key agreement, using the specified key.
           | ||||||||||
|  | 
           Generates the shared secret and stores it into the buffer 
            sharedSecredatoffset. | ||||||||||
|  | 
           Generates the shared secret.
           | ||||||||||
|  | 
           Generates the shared secret.
           | ||||||||||
|  | 
           Initializes this 
            KeyAgreementSpiwith the specified key and the specified randomness source. | ||||||||||
|  | 
           Initializes this 
            KeyAgreementSpiwith the specified key, algorithm parameters and randomness source. | ||||||||||
| [Expand] 
           Inherited Methods
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.lang.Object | |||||||||||
Does the next (or the last) phase of the key agreement, using the specified key.
| key | the key received from the other party for this phase. | 
|---|---|
| lastPhase | set to trueif this is the last phase of this key agreement. | 
| InvalidKeyException | if the specified key cannot be used in this key agreement or this phase, | 
|---|---|
| IllegalStateException | if this instance has not been initialized. | 
Generates the shared secret and stores it into the buffer sharedSecred at offset.
| sharedSecret | the buffer to store the shared secret. | 
|---|---|
| offset | the offset in the buffer. | 
| IllegalStateException | if this key agreement is not complete. | 
|---|---|
| ShortBufferException | if the specified buffer is too small for the shared secret. | 
Generates the shared secret.
| IllegalStateException | if this key agreement is not complete. | 
|---|
Generates the shared secret.
| algorithm | the algorithm to for the SecretKey | 
|---|
SecretKey of the specified algorithm.| IllegalStateException | if this key agreement is not complete. | 
|---|---|
| NoSuchAlgorithmException | if the specified algorithm for the secret key does not exists. | 
| InvalidKeyException | if a SecretKeywith the specified algorithm cannot be created using the generated shared secret. | 
Initializes this KeyAgreementSpi with the specified key and the specified randomness source.
| key | the key to initialize this key agreement. | 
|---|---|
| random | the source for any randomness needed. | 
| InvalidKeyException | if the specified key cannot be used to initialize this key agreement. | 
|---|
Initializes this KeyAgreementSpi with the specified key, algorithm parameters and randomness source.
| key | the key to initialize this key agreement. | 
|---|---|
| params | the parameters for this key agreement algorithm. | 
| random | the source for any randomness needed. | 
| InvalidKeyException | if the specified key cannot be used to initialize this key agreement. | 
|---|---|
| InvalidAlgorithmParameterException | if the specified parameters are invalid for this key agreement algorithm. |