Executes the next phase of this key agreement with the given key that was received from one of the other parties involved in this key agreement.
key | the key for this phase. For example, in the case of Diffie-Hellman between 2 parties, this would be the other party's Diffie-Hellman public key. | |
lastPhase | flag which indicates whether or not this is the last phase of this key agreement. |
InvalidKeyException | if the given key is inappropriate for this phase. | |
IllegalStateException | if this key agreement has not been initialized. |
Diagram: KeyManagement