SslStream.CipherAlgorithm Свойство

Определение

Возвращает значение, определяющее алгоритм массового шифрования, используемый этим SslStreamметодом.

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

Значение свойства

Значение, определяющее алгоритм массового шифрования, используемый этим SslStream.

Исключения

Свойство CipherAlgorithm было выполнено до завершения процесса проверки подлинности или сбой процесса проверки подлинности.

Примеры

В следующем примере кода отображаются параметры шифрования для указанного потока.

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

Комментарии

Значение Null требуется для свойства, если CipherAlgorithm значение перечисления используется для NoEncryption создания экземпляраSslStream.

Windows Server 2003 и Windows XP не поддерживают Null значение. Таким образом, даже если Null значение используется для создания экземпляра SslStream , EncryptionPolicy свойство будет None. Значение Null возвращается только в Windows Vista и более поздних версиях.

Применяется к