ECDiffieHellmanOpenSsl.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

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 para anteponer al secreto derivado antes de la operación hash.

secretAppend
Byte[]

Valor para anexar al secreto derivado antes de la operación hash.

Devoluciones

Byte[]

El hash del secreto compartido después de anteponer o anexar datos según se solicite.

Excepciones

La curva que usa otherPartyPublicKey tiene un tamaño diferente que la curva de esta clave.

o bien

El parámetro hashAlgorithm no especifica ningún valor hash.

otherPartyPublicKey es null.

La curva que usa otherPartyPublicKey es diferente de la curva de esta clave.

o bien

Esta instancia representa solo una clave pública.

Se aplica a