Share via


KeyAgreementSpi.EngineInit Method

Definition

Overloads

EngineInit(IKey, SecureRandom)

Initializes this key agreement with the given key and source of randomness.

EngineInit(IKey, IAlgorithmParameterSpec, SecureRandom)

Initializes this key agreement with the given key, set of algorithm parameters, and source of randomness.

EngineInit(IKey, SecureRandom)

Initializes this key agreement with the given key and source of randomness.

[Android.Runtime.Register("engineInit", "(Ljava/security/Key;Ljava/security/SecureRandom;)V", "GetEngineInit_Ljava_security_Key_Ljava_security_SecureRandom_Handler")]
protected abstract void EngineInit (Java.Security.IKey? key, Java.Security.SecureRandom? random);
[<Android.Runtime.Register("engineInit", "(Ljava/security/Key;Ljava/security/SecureRandom;)V", "GetEngineInit_Ljava_security_Key_Ljava_security_SecureRandom_Handler")>]
abstract member EngineInit : Java.Security.IKey * Java.Security.SecureRandom -> unit

Parameters

key
IKey

the party's private information. For example, in the case of the Diffie-Hellman key agreement, this would be the party's own Diffie-Hellman private key.

random
SecureRandom

the source of randomness

Attributes

Exceptions

if the specified key cannot be used to initialize this key agreement.

Remarks

Initializes this key agreement with the given key and source of randomness. The given key is required to contain all the algorithm parameters required for this key agreement.

If the key agreement algorithm requires random bytes, it gets them from the given source of randomness, random. However, if the underlying algorithm implementation does not require any random bytes, random is ignored.

Java documentation for javax.crypto.KeyAgreementSpi.engineInit(java.security.Key, java.security.SecureRandom).

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

EngineInit(IKey, IAlgorithmParameterSpec, SecureRandom)

Initializes this key agreement with the given key, set of algorithm parameters, and source of randomness.

[Android.Runtime.Register("engineInit", "(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V", "GetEngineInit_Ljava_security_Key_Ljava_security_spec_AlgorithmParameterSpec_Ljava_security_SecureRandom_Handler")]
protected abstract void EngineInit (Java.Security.IKey? key, Java.Security.Spec.IAlgorithmParameterSpec? params, Java.Security.SecureRandom? random);
[<Android.Runtime.Register("engineInit", "(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V", "GetEngineInit_Ljava_security_Key_Ljava_security_spec_AlgorithmParameterSpec_Ljava_security_SecureRandom_Handler")>]
abstract member EngineInit : Java.Security.IKey * Java.Security.Spec.IAlgorithmParameterSpec * Java.Security.SecureRandom -> unit

Parameters

key
IKey

the party's private information. For example, in the case of the Diffie-Hellman key agreement, this would be the party's own Diffie-Hellman private key.

params
IAlgorithmParameterSpec

the key agreement parameters

random
SecureRandom

the source of randomness

Attributes

Exceptions

if the specified key cannot be used to initialize this key agreement.

if the specified parameters are invalid for this key agreement algorithm.

Remarks

Initializes this key agreement with the given key, set of algorithm parameters, and source of randomness.

Java documentation for javax.crypto.KeyAgreementSpi.engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom).

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