ECDiffieHellmanCng.DeriveKeyFromHash Método

Definición

Realiza la derivación de claves mediante un algoritmo hash especificado con datos antepuestos o anexados opcionales.

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

Parámetros

otherPartyPublicKey
ECDiffieHellmanPublicKey

La clave pública de la otra parte.

hashAlgorithm
HashAlgorithmName

Algoritmo hash que se va a usar para derivar el material de clave.

secretPrepend
Byte[]

Valor que se va a anteponer al secreto derivado antes del hash.

secretAppend
Byte[]

Valor que se va a anexar al secreto derivado antes del hash.

Devoluciones

Byte[]

Hash del secreto compartido después de tener datos pendientes o anexados según se solicite.

Excepciones

Una clase derivada debe invalidar este método.

La curva usada por otherPartyPublicKey tiene un tamaño diferente al de la curva de esta clave.

O bien

El hashAlgorithm parámetro no especifica un hash.

otherPartyPublicKey es null.

La curva utilizada por otherPartyPublicKey es diferente de la curva de esta clave.

O bien

Esta instancia representa solo una clave pública.

Se aplica a