SslStream.CipherAlgorithm Propriedade

Definição

Obtém um valor que identifica o algoritmo de encriptação em massa usado por este SslStream.

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

Valor de Propriedade

Um valor que identifica o algoritmo de encriptação em massa usado por este SslStream.

Exceções

A CipherAlgorithm propriedade foi acedida antes da conclusão do processo de autenticação ou antes da falha do processo de autenticação.

Exemplos

O exemplo de código seguinte mostra as definiçõ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

Observações

É necessário um valor de Null para a CipherAlgorithm propriedade quando o NoEncryption valor de enumeração é usado para construir uma SslStream instância.

Windows Server 2003 e Windows XP não suportam o valor Null. Portanto, mesmo que o Null valor seja usado para construir a SslStream instância, a EncryptionPolicy propriedade será None. O valor Null só é devolvido em Windows Vista e posteriores.

Aplica-se a