Bagikan melalui


AsymmetricAlgorithm.SignatureAlgorithm Properti

Definisi

Saat diimplementasikan di kelas turunan, mendapatkan nama algoritma tanda tangan. Jika tidak, selalu melempar .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

Nilai Properti

Nama algoritma tanda tangan.

Contoh

Contoh kode berikut menunjukkan cara mengambil alih SignatureAlgorithm properti untuk mengembalikan nama algoritma tanda tangan. Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk AsymmetricAlgorithm kelas .

    // 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

Berlaku untuk

Lihat juga