ECDiffieHellman.DeriveKeyMaterial(ECDiffieHellmanPublicKey) 方法

定义

在派生类中实现时,对共享机密执行密钥派生。

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()

参数

otherPartyPublicKey
ECDiffieHellmanPublicKey

另一方的公钥。

返回

Byte[]

使用共享机密作为输入的密钥派生功能的结果。

例外

otherPartyPublicKey 使用的曲线的大小与此密钥使用的曲线不同。

otherPartyPublicKeynull

otherPartyPublicKey使用的曲线与此密钥使用的曲线不同。

  • 或 -

此实例仅表示一个公钥。

注解

此方法的默认行为等效于调用 DeriveKeyFromHash 将 SHA-256 指定为哈希算法,不带追加值或追加值。 某些实现允许更改此方法的行为,并且建议调用方调用哪种方法显式表示该方法执行所需的密钥派生。

适用于