NegotiateStream.IsEncrypted プロパティ

定義

このBooleanがデータ暗号化を使用するかどうかを示すNegotiateStream値を取得します。

public:
 virtual property bool IsEncrypted { bool get(); };
public override bool IsEncrypted { get; }
member this.IsEncrypted : bool
Public Overrides ReadOnly Property IsEncrypted As Boolean

プロパティ値

true データがネットワーク経由で送信される前に暗号化され、リモート エンドポイントに到達したときに復号化される場合。それ以外の場合は false

次のコード例は、このプロパティの値を表示する方法を示しています。

 static void DisplayAuthenticationProperties(NegotiateStream stream)
{
     Console.WriteLine("IsAuthenticated: {0}", stream.IsAuthenticated);
    Console.WriteLine("IsMutuallyAuthenticated: {0}", stream.IsMutuallyAuthenticated);
    Console.WriteLine("IsEncrypted: {0}", stream.IsEncrypted);
    Console.WriteLine("IsSigned: {0}", stream.IsSigned);
    Console.WriteLine("ImpersonationLevel: {0}", stream.ImpersonationLevel);
    Console.WriteLine("IsServer: {0}", stream.IsServer);
}

注釈

暗号化は、データのプライバシーを保護するのに役立ちます。つまり、データが転送中である間、第三者が解読できないようにするのに役立ちます。

適用対象

こちらもご覧ください