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

Значение свойства

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

Применяется к

См. также раздел