ECDiffieHellmanCng.DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[]) Método
Definição
Executa a derivação de chave usando um algoritmo de hash especificado com os dados opcionais anexados ou acrescentados.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()
Parâmetros
- otherPartyPublicKey
- ECDiffieHellmanPublicKey
A chave pública do outro participante.The other party's public key.
- hashAlgorithm
- HashAlgorithmName
O algoritmo de hash a ser usado para derivar o material de chave.The hash algorithm to use to derive the key material.
- secretPrepend
- Byte[]
Um valor a ser precedido ao segredo derivado antes do hash.A value to prepend to the derived secret before hashing.
- secretAppend
- Byte[]
Um valor a ser acrescentado ao segredo derivado antes do hash.A value to append to the derived secret before hashing.
Retornos
- Byte[]
O hash do segredo compartilhado após a anexação ou o acréscimo de dados, conforme solicitado.The hash of the shared secret after prepending or appending data as requested.
Exceções
Uma classe derivada deve substituir esse método.A derived class must override this method.
A curva usada por otherPartyPublicKey tem um tamanho diferente da curva dessa chave.The curve used by otherPartyPublicKey has a different size than the curve from this key.
- ou --or-
O parâmetro hashAlgorithm não especifica um hash.The hashAlgorithm parameter does not specify a hash.
otherPartyPublicKey é null.otherPartyPublicKey is null.
A curva usada por otherPartyPublicKey é diferente da curva dessa chave.The curve used by otherPartyPublicKey is different than the curve from this key.
- ou --or-
Essa instância representa apenas uma chave pública.This instance represents only a public key.