SslStream.KeyExchangeAlgorithm Proprietà

Definizione

Attenzione

KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.

Ottiene l'algoritmo di scambio di chiavi utilizzato da questo SslStreamoggetto .

public:
 virtual property System::Security::Authentication::ExchangeAlgorithmType KeyExchangeAlgorithm { System::Security::Authentication::ExchangeAlgorithmType get(); };
[System.Obsolete("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual System.Security.Authentication.ExchangeAlgorithmType KeyExchangeAlgorithm { get; }
public virtual System.Security.Authentication.ExchangeAlgorithmType KeyExchangeAlgorithm { get; }
[<System.Obsolete("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.KeyExchangeAlgorithm : System.Security.Authentication.ExchangeAlgorithmType
member this.KeyExchangeAlgorithm : System.Security.Authentication.ExchangeAlgorithmType
Public Overridable ReadOnly Property KeyExchangeAlgorithm As ExchangeAlgorithmType

Valore della proprietà

Un ExchangeAlgorithmType valore.

Attributi

Esempio

Nell'esempio di codice seguente vengono visualizzate le impostazioni di crittografia per il flusso specificato.

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

Commenti

Il valore di questa proprietà è None fino a quando non si verifica l'autenticazione.

L'algoritmo di scambio delle chiavi protegge le informazioni usate per generare chiavi condivise.

Si applica a