ECDiffieHellmanCng.DeriveKeyFromHash Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs key derivation using a specified hash algorithm with optional prepended or appended data.
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()
Parameters
- otherPartyPublicKey
- ECDiffieHellmanPublicKey
The other party's public key.
- hashAlgorithm
- HashAlgorithmName
The hash algorithm to use to derive the key material.
- secretPrepend
- Byte[]
A value to prepend to the derived secret before hashing.
- secretAppend
- Byte[]
A value to append to the derived secret before hashing.
Returns
The hash of the shared secret after prepending or appending data as requested.
Exceptions
A derived class must override this method.
The curve used by otherPartyPublicKey
has a different size than the curve from this key.
-or-
The hashAlgorithm
parameter does not specify a hash.
otherPartyPublicKey
is null
.
The curve used by otherPartyPublicKey
is different than the curve from this key.
-or-
This instance represents only a public key.
Applies to
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro