SslStream.CipherAlgorithm プロパティ

定義

この SslStream が使用する一括暗号化アルゴリズムを識別する値を取得します。Gets a value that identifies the bulk encryption algorithm used by this 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

プロパティ値

CipherAlgorithmType

このによって使用される一括暗号化アルゴリズムを識別する値 SslStreamA value that identifies the bulk encryption algorithm used by this SslStream.

例外

認証プロセスの完了前に CipherAlgorithm プロパティにアクセスしました。または、認証プロセスでエラーが発生しました。The CipherAlgorithm property was accessed before the completion of the authentication process or the authentication process failed.

次のコード例では、指定されたストリームの暗号化設定を表示します。The following code example displays the cryptography settings for the specified stream.

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

注釈

Null CipherAlgorithm NoEncryption インスタンスを構築するために列挙値を使用する場合、プロパティには値が必要です SslStreamA value of Null is required for the CipherAlgorithm property when the NoEncryption enumeration value is used to construct a SslStream instance.

Windows Server 2003Windows Server 2003 Windows XPWindows XP は、値をサポートしていません Nulland Windows XPWindows XP do not support the Null value. このため、 Null インスタンスの作成に値が使用されている場合でも、プロパティはになり SslStream EncryptionPolicy None ます。So even if the Null value is used to construct the SslStream instance, the EncryptionPolicy property will be None. この Null 値は、Windows Vista 以降でのみ返されます。The Null value is only returned on Windows Vista and later.

適用対象