ECDiffieHellmanCng.DeriveKeyFromHmac メソッド

定義

指定された HMAC (Hash-based Message Authentication Code) アルゴリズムを省略可能な先頭または末尾に追加されたデータと共に使用して、キー派生を実行します。

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

パラメーター

otherPartyPublicKey
ECDiffieHellmanPublicKey

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

hashAlgorithm
HashAlgorithmName

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

hmacKey
Byte[]

HMAC のキー。

secretPrepend
Byte[]

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

secretAppend
Byte[]

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

戻り値

Byte[]

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

例外

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

- または -

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

otherPartyPublicKeynullです。

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

- または -

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

適用対象