SslStream.CipherStrength Propriedade

Definição

Obtém um valor que identifica a força do algoritmo de cifra usado por este SslStream.

public:
 virtual property int CipherStrength { int get(); };
public virtual int CipherStrength { get; }
member this.CipherStrength : int
Public Overridable ReadOnly Property CipherStrength As Integer

Valor de Propriedade

Um valor que especifica Int32 a força do algoritmo, em bits.

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

O valor desta propriedade é zero até ocorrer a autenticação.

Esta propriedade devolve um dos seguintes valores:

  • 0

  • 40

  • 56

  • 80

  • 128

  • 168

  • 192

  • 256

Aplica-se a