ECDiffieHellmanCng.DeriveKeyFromHmac Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Realiza a derivação de chaves usando um algoritmo HMAC (Hash-based Message Authentication Code) especificado com dados opcionais prependidos ou acrescentados.
public:
override cli::array <System::Byte> ^ DeriveKeyFromHmac(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ hmacKey, cli::array <System::Byte> ^ secretPrepend, cli::array <System::Byte> ^ secretAppend);
public override byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] hmacKey, byte[] secretPrepend, byte[] secretAppend);
override this.DeriveKeyFromHmac : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] * byte[] -> byte[]
Public Overrides Function DeriveKeyFromHmac (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName, hmacKey As Byte(), secretPrepend As Byte(), secretAppend As Byte()) As Byte()
Parâmetros
- otherPartyPublicKey
- ECDiffieHellmanPublicKey
A chave pública da outra parte.
- hashAlgorithm
- HashAlgorithmName
O algoritmo de hash a usar para derivar o material-chave.
- hmacKey
- Byte[]
A chave para o HMAC.
- secretPrepend
- Byte[]
Um valor para antepender ao segredo derivado antes de fazer o hash.
- secretAppend
- Byte[]
Um valor a adicionar ao segredo derivado antes do hash.
Devoluções
O HMAC do segredo partilhado após preencher ou anexar dados conforme solicitado.
Exceções
A curva usada por otherPartyPublicKey tem um tamanho diferente da curva desta chave.
-ou-
O hashAlgorithm parâmetro não especifica um hash.
otherPartyPublicKey é null.
A curva usada por otherPartyPublicKey é diferente da curva desta chave.
-ou-
Esta instância representa apenas uma chave pública.