SslStream.KeyExchangeAlgorithm Propiedad

Definición

Obtiene el algoritmo de intercambio de claves utilizado por esta SslStream.

C#
public virtual System.Security.Authentication.ExchangeAlgorithmType KeyExchangeAlgorithm { get; }

Valor de propiedad

Valor ExchangeAlgorithmType.

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 None hasta que se produce la autenticación.

El algoritmo de intercambio de claves protege la información utilizada para generar claves compartidas.

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