Bewerken

Share via


ECDiffieHellman.DeriveKeyMaterial(ECDiffieHellmanPublicKey) Method

Definition

When implemented in a derived class, performs a key derivation on the shared secret.

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

Parameters

otherPartyPublicKey
ECDiffieHellmanPublicKey

The other party's public key.

Returns

Byte[]

The result of the key derivation function, using the shared secret as an input.

Exceptions

The curve used by otherPartyPublicKey has a different size than the curve from this key.

otherPartyPublicKey is null.

The curve used by otherPartyPublicKey is different than the curve from this key.

-or-

This instance represents only a public key.

Remarks

The default behavior of this method is equivalent to calling DeriveKeyFromHash specifying SHA-256 as the hash algorithm with no prepend or append values. Some implementations allow the behavior of this method to be changed, and callers are advised to call whichever method explicitly says it performs the key derivation they need.

Applies to