Compartilhar via


KeyAgreementSpi.EngineDoPhase(IKey, Boolean) Method

Definition

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.

[Android.Runtime.Register("engineDoPhase", "(Ljava/security/Key;Z)Ljava/security/Key;", "GetEngineDoPhase_Ljava_security_Key_ZHandler")]
protected abstract Java.Security.IKey? EngineDoPhase (Java.Security.IKey? key, bool lastPhase);
[<Android.Runtime.Register("engineDoPhase", "(Ljava/security/Key;Z)Ljava/security/Key;", "GetEngineDoPhase_Ljava_security_Key_ZHandler")>]
abstract member EngineDoPhase : Java.Security.IKey * bool -> Java.Security.IKey

Parameters

key
IKey

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
Boolean

flag which indicates whether or not this is the last phase of this key agreement.

Returns

the (intermediate) key resulting from this phase, or null if this phase does not yield a key

Attributes

Exceptions

if the specified key cannot be used in this key agreement or this phase,

if this instance has not been initialized.

Remarks

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.

Java documentation for javax.crypto.KeyAgreementSpi.engineDoPhase(java.security.Key, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to