SslStream.HashStrength Propriété

Définition

Obtient une valeur qui identifie la puissance de l'algorithme de hachage utilisé par cette instance.

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

Valeur de propriété

Valeur Int32 qui spécifie la puissance de l'algorithme HashAlgorithmType, en bits. Les valeurs autorisées sont 128 ou 160.

Exemples

L’exemple de code suivant affiche les paramètres de chiffrement pour le flux spécifié.

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

Remarques

La valeur de cette propriété est zéro jusqu’à ce que l’authentification se produise.

S’applique à