AsymmetricAlgorithm.SignatureAlgorithm 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中實作時,取得簽章演算法的名稱。 否則,一律擲回 NotImplementedException。
public:
virtual property System::String ^ SignatureAlgorithm { System::String ^ get(); };
public:
abstract property System::String ^ SignatureAlgorithm { System::String ^ get(); };
public virtual string? SignatureAlgorithm { get; }
public virtual string SignatureAlgorithm { get; }
public abstract string SignatureAlgorithm { get; }
member this.SignatureAlgorithm : string
Public Overridable ReadOnly Property SignatureAlgorithm As String
Public MustOverride ReadOnly Property SignatureAlgorithm As String
屬性值
簽章演算法的名稱。
範例
下列程式代碼範例示範如何覆寫 SignatureAlgorithm 屬性,以傳回簽章演算法的名稱。 此程式代碼範例是針對 類別提供的較大範例的 AsymmetricAlgorithm 一部分。
// This example uses the SHA1 algorithm.
// Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
public:
property String^ SignatureAlgorithm
{
virtual String^ get() override
{
return "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
}
}
// This example uses the SHA1 algorithm.
// Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
public override string SignatureAlgorithm
{
get {return "http://www.w3.org/2000/09/xmldsig#rsa-sha1";}
}
' This example uses the SHA1 algorithm.
' Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
Public Overrides ReadOnly Property SignatureAlgorithm() As String
Get
Return "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
End Get
End Property