Freigeben über


SslStream.KeyExchangeAlgorithm Eigenschaft

Definition

Ruft den von diesem SslStream verwendeten Schlüsselaustauschalgorithmus ab.

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

Eigenschaftswert

Ein ExchangeAlgorithmType-Wert.

Beispiele

Im folgenden Codebeispiel werden die Kryptografieeinstellungen für den angegebenen Stream angezeigt.

static void DisplaySecurityLevel( SslStream^ stream )
{
   Console::WriteLine( L"Cipher: {0} strength {1}", stream->CipherAlgorithm, stream->CipherStrength );
   Console::WriteLine( L"Hash: {0} strength {1}", stream->HashAlgorithm, stream->HashStrength );
   Console::WriteLine( L"Key exchange: {0} strength {1}", stream->KeyExchangeAlgorithm, stream->KeyExchangeStrength );
   Console::WriteLine( L"Protocol: {0}", stream->SslProtocol );
}
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

Hinweise

Der Wert dieser Eigenschaft ist None , bis die Authentifizierung erfolgt.

Der Schlüsselaustauschalgorithmus schützt Informationen, die zum Generieren freigegebener Schlüssel verwendet werden.

Gilt für: