Redigera

Dela via


ECDiffieHellman.DeriveRawSecretAgreement(ECDiffieHellmanPublicKey) Method

Definition

Derive raw key material.

public:
 virtual cli::array <System::Byte> ^ DeriveRawSecretAgreement(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey);
public virtual byte[] DeriveRawSecretAgreement (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey);
abstract member DeriveRawSecretAgreement : System.Security.Cryptography.ECDiffieHellmanPublicKey -> byte[]
override this.DeriveRawSecretAgreement : System.Security.Cryptography.ECDiffieHellmanPublicKey -> byte[]
Public Overridable Function DeriveRawSecretAgreement (otherPartyPublicKey As ECDiffieHellmanPublicKey) As Byte()

Parameters

otherPartyPublicKey
ECDiffieHellmanPublicKey

The public key of the party with which to derive a mutual secret.

Returns

Byte[]

The raw key agreement.

Exceptions

otherPartyPublicKey is null.

otherPartyPublicKey is over a different curve than this key.

A derived implementation has not provided an implementation of the method.

The current platform does not support raw key agreement.

The object has already been disposed.

Remarks

Care must be taking when using the raw derived secret agreement value. The raw value is expected to be used as input in to a Key Derivation Function, and not used directly as key material.

Applies to