ECDiffieHellman::DeriveKeyFromHash Method (ECDiffieHellmanPublicKey^, HashAlgorithmName, array<Byte>^, array<Byte>^)
When implemented in a derived class, derives bytes that can be used as a key using a hash function, given another party's public key, hash algorithm's name, a prepend value and an append value.
Assembly: System.Core (in System.Core.dll)
public: virtual array<unsigned char>^ DeriveKeyFromHash( ECDiffieHellmanPublicKey^ otherPartyPublicKey, HashAlgorithmName hashAlgorithm, array<unsigned char>^ secretPrepend, array<unsigned char>^ secretAppend )
Parameters
- otherPartyPublicKey
-
Type:
System.Security.Cryptography::ECDiffieHellmanPublicKey^
The other party's public key.
- hashAlgorithm
-
Type:
System.Security.Cryptography::HashAlgorithmName
The hash algorithm to use to derive the key material.
- secretPrepend
-
Type:
array<System::Byte>^
A value to prepend to the derived secret before hashing.
- secretAppend
-
Type:
array<System::Byte>^
A value to append to the derived secret before hashing.
Return Value
Type: array<System::Byte>^The key material from the key exchange with the other party’s public key.
| Exception | Condition |
|---|---|
| NotImplementedException | A derived class must override this method. |
Available since 4.6.2