SslStream.IsSigned 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得 Boolean 值,指示使用此資料流傳送的資料是否簽章。
public:
virtual property bool IsSigned { bool get(); };
public override bool IsSigned { get; }
member this.IsSigned : bool
Public Overrides ReadOnly Property IsSigned As Boolean
屬性值
如果資料在傳輸前簽章,則為 true
,否則為 false
。
範例
下列程式代碼範例示範如何顯示這個屬性的值。
static void DisplaySecurityServices( SslStream^ stream )
{
Console::WriteLine( L"Is authenticated: {0} as server? {1}", stream->IsAuthenticated, stream->IsServer );
Console::WriteLine( L"IsSigned: {0}", stream->IsSigned );
Console::WriteLine( L"Is Encrypted: {0}", stream->IsEncrypted );
Console::WriteLine( L"Is mutually authenticated: {0}", stream->IsMutuallyAuthenticated );
}
static void DisplaySecurityServices(SslStream stream)
{
Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer);
Console.WriteLine("IsSigned: {0}", stream.IsSigned);
Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted);
Console.WriteLine("Is mutually authenticated: {0}", stream.IsMutuallyAuthenticated);
}
Private Shared Sub DisplaySecurityServices(stream As SslStream)
Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer)
Console.WriteLine("IsSigned: {0}", stream.IsSigned)
Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted)
Console.WriteLine("Is mutually authenticated: {0}", stream.IsMutuallyAuthenticated)
End Sub
備註
數據簽署有助於保護數據的完整性,也就是協助收件者判斷數據在傳輸時是否遭到竄改。