AsymmetricAlgorithm.SignatureAlgorithm 屬性

定義

在衍生類別中實作時,取得簽章演算法的名稱。 否則,一律擲回 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

適用於

另請參閱