SslStream.HashStrength Propiedad

Definición

Obtiene un valor que identifica la intensidad del algoritmo de hash utilizado por esta instancia.

C#
public virtual int HashStrength { get; }

Valor de propiedad

Valor Int32 que especifica la intensidad del algoritmo HashAlgorithmType, en bits. Los valores válidos son 128 ó 160.

Ejemplos

En el ejemplo de código siguiente se muestra la configuración de criptografía de la secuencia especificada.

C#
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);
}

Comentarios

El valor de esta propiedad es cero hasta que se produce la autenticación.

Se aplica a

Produto Versións
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1