SslStream.CipherAlgorithm Propriété

Définition

Obtient une valeur qui identifie l’algorithme de chiffrement en bloc utilisé par ce SslStreamparamètre .

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

Valeur de propriété

Valeur qui identifie l’algorithme de chiffrement en bloc utilisé par ce SslStream.

Exceptions

La CipherAlgorithm propriété a été accessible avant l’achèvement du processus d’authentification ou l’échec du processus d’authentification.

Exemples

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

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

Une valeur est Null requise pour la CipherAlgorithm propriété lorsque la NoEncryption valeur d’énumération est utilisée pour construire une SslStream instance.

Windows Server 2003 et Windows XP ne prennent pas en charge la Null valeur. Ainsi, même si la Null valeur est utilisée pour construire l’instance SslStream , la EncryptionPolicy propriété sera None. La Null valeur est retournée uniquement sur Windows Vista et versions ultérieures.

S’applique à