SslStream.CipherAlgorithm Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Dikkat
KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.
Bu SslStreamtarafından kullanılan toplu şifreleme algoritmasını tanımlayan bir değer alır.
public:
virtual property System::Security::Authentication::CipherAlgorithmType CipherAlgorithm { System::Security::Authentication::CipherAlgorithmType get(); };
[System.Obsolete("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual System.Security.Authentication.CipherAlgorithmType CipherAlgorithm { get; }
public virtual System.Security.Authentication.CipherAlgorithmType CipherAlgorithm { get; }
[<System.Obsolete("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.CipherAlgorithm : System.Security.Authentication.CipherAlgorithmType
member this.CipherAlgorithm : System.Security.Authentication.CipherAlgorithmType
Public Overridable ReadOnly Property CipherAlgorithm As CipherAlgorithmType
Özellik Değeri
Bu SslStreamtarafından kullanılan toplu şifreleme algoritmasını tanımlayan bir değer.
- Öznitelikler
Özel durumlar
Özelliğine CipherAlgorithm kimlik doğrulama işlemi tamamlanmadan önce erişildi veya kimlik doğrulama işlemi başarısız oldu.
Örnekler
Aşağıdaki kod örneği, belirtilen akış için şifreleme ayarlarını görüntüler.
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
Açıklamalar
Bir örneği oluşturmak için numaralandırma değeri Null kullanıldığında özelliği NoEncryption için CipherAlgorithm değeri SslStream gereklidir.
Windows Server 2003 ve Windows XP değeri desteklemez Null . Bu nedenle, örneği oluşturmak için değer kullanılsa Null bile özelliği olurNone.SslStreamEncryptionPolicy Değer Null yalnızca Windows Vista ve sonraki sürümlerde döndürülür.