ECDiffieHellmanCng.DeriveKeyFromHash メソッド

定義

指定されたハッシュ アルゴリズムを省略可能な先頭または末尾に追加されたデータと共に使用して、キー派生を実行します。

public:
 override cli::array <System::Byte> ^ DeriveKeyFromHash(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ secretPrepend, cli::array <System::Byte> ^ secretAppend);
public override byte[] DeriveKeyFromHash (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] secretPrepend, byte[] secretAppend);
public override byte[] DeriveKeyFromHash (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? secretPrepend, byte[]? secretAppend);
override this.DeriveKeyFromHash : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] -> byte[]
Public Overrides Function DeriveKeyFromHash (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName, secretPrepend As Byte(), secretAppend As Byte()) As Byte()

パラメーター

otherPartyPublicKey
ECDiffieHellmanPublicKey

もう一方のパーティの公開キー。

hashAlgorithm
HashAlgorithmName

キー マテリアルを派生させるために使用するハッシュ アルゴリズム。

secretPrepend
Byte[]

ハッシュ前に派生の機密情報の先頭に追加する値。

secretAppend
Byte[]

ハッシュ前に派生の機密情報に追加する値。

戻り値

Byte[]

要求に応じてデータを先頭または末尾に追加した後の共有シークレットのハッシュ。

例外

派生クラスはこのメソッドをオーバーライドする必要があります。

otherPartyPublicKey によって使用される曲線のサイズが、このキーの曲線のサイズと異なります。

  • または -

hashAlgorithm パラメーターにハッシュが指定されていません。

otherPartyPublicKeynullです。

otherPartyPublicKey によって使用される曲線が、このキーの曲線と異なります。

  • または -

このインスタンスでは公開キーのみ表されます。

適用対象