AsymmetricAlgorithm.SignatureAlgorithm Właściwość

Definicja

Po zaimplementowaniu w klasie pochodnej pobiera nazwę algorytmu podpisu. W przeciwnym razie zawsze zgłasza wartość 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

Wartość właściwości

Nazwa algorytmu podpisu.

Przykłady

W poniższym przykładzie kodu pokazano, jak zastąpić SignatureAlgorithm właściwość w celu zwrócenia nazwy algorytmu podpisu. Ten przykład kodu jest częścią większego przykładu udostępnionego AsymmetricAlgorithm dla klasy .

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

Dotyczy

Zobacz też