Compartir por


AsymmetricAlgorithm.SignatureAlgorithm Propiedad

Definición

Cuando se implementa en una clase derivada, obtiene el nombre del algoritmo de firma. De lo contrario, siempre produce una NotImplementedExceptionexcepción .

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

Valor de propiedad

Nombre del algoritmo de firma.

Ejemplos

En el ejemplo de código siguiente se muestra cómo invalidar la SignatureAlgorithm propiedad para devolver el nombre del algoritmo de firma. Este ejemplo de código forma parte de un ejemplo más grande proporcionado para la AsymmetricAlgorithm clase .

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

Se aplica a

Consulte también