SslStream.HashStrength Eigenschaft

Definition

Ruft einen Wert ab, der die Stärke des von dieser Instanz verwendeten Hashalgorithmus angibt.

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

Eigenschaftswert

Ein Int32-Wert, der die Stärke des HashAlgorithmType-Algorithmus in Bits angibt. Gültige Werte sind 128 oder 160.

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 null, bis die Authentifizierung erfolgt.

Gilt für: