SslStream.HashAlgorithm Propriedade

Definição

Obtém o algoritmo usado para gerar MACs (códigos de autenticação de mensagem).

public:
 virtual property System::Security::Authentication::HashAlgorithmType HashAlgorithm { System::Security::Authentication::HashAlgorithmType get(); };
public virtual System.Security.Authentication.HashAlgorithmType HashAlgorithm { get; }
member this.HashAlgorithm : System.Security.Authentication.HashAlgorithmType
Public Overridable ReadOnly Property HashAlgorithm As HashAlgorithmType

Valor da propriedade

O algoritmo usado para gerar códigos de autenticação de mensagem (MACs).

Exceções

A HashAlgorithm propriedade foi acessada antes da conclusão do processo de autenticação ou o processo de autenticação falhou.

Exemplos

O exemplo de código a seguir exibe as configurações de criptografia para o fluxo especificado.

static void DisplaySecurityLevel(SslStream stream)
{
   Console.WriteLine("Cipher: {0} strength {1}", stream.CipherAlgorithm, stream.CipherStrength);
   Console.WriteLine("Hash: {0} strength {1}", stream.HashAlgorithm, stream.HashStrength);
   Console.WriteLine("Key exchange: {0} strength {1}", stream.KeyExchangeAlgorithm, stream.KeyExchangeStrength);
   Console.WriteLine("Protocol: {0}", stream.SslProtocol);
}
Private Shared Sub DisplaySecurityLevel(stream As SslStream)
    Console.WriteLine("Cipher: {0} strength {1}", stream.CipherAlgorithm, stream.CipherStrength)
    Console.WriteLine("Hash: {0} strength {1}", stream.HashAlgorithm, stream.HashStrength)
    Console.WriteLine("Key exchange: {0} strength {1}", stream.KeyExchangeAlgorithm, stream.KeyExchangeStrength)
    Console.WriteLine("Protocol: {0}", stream.SslProtocol)
End Sub

Comentários

Algoritmos de autenticação de mensagem geram hashes de mensagem e assinaturas usadas para detectar adulteração e falsificação.

Aplica-se a