X509AsymmetricSecurityKey.GetSignatureFormatter(String) Método
Definição
Obtém o algoritmo formatador para a assinatura digital.Gets the formatter algorithm for the digital signature.
public:
override System::Security::Cryptography::AsymmetricSignatureFormatter ^ GetSignatureFormatter(System::String ^ algorithm);
public override System.Security.Cryptography.AsymmetricSignatureFormatter GetSignatureFormatter (string algorithm);
override this.GetSignatureFormatter : string -> System.Security.Cryptography.AsymmetricSignatureFormatter
Public Overrides Function GetSignatureFormatter (algorithm As String) As AsymmetricSignatureFormatter
Parâmetros
- algorithm
- String
O algoritmo formatador para a assinatura digital da qual obter uma instância.The formatter algorithm for the digital signature to get an instance of.
Retornos
Um AsymmetricSignatureDeformatter que representa o algoritmo formatador para a assinatura digital.An AsymmetricSignatureDeformatter that represents the formatter algorithm for the digital signature.
Exceções
O certificado X.509 especificado no construtor não tem uma chave privada.The X.509 certificate specified in the constructor does not have a private key.
- ou --or-
algorithm é XmlDsigDSAUrl e a chave privada do certificado X.509 especificado no construtor não é do tipo DSA.algorithm is XmlDsigDSAUrl and the private key for the X.509 certificate specified in the constructor is not of type DSA.
- ou --or-
algorithm é XmlDsigRSASHA1Url ou RsaSha256Signature e a chave privada do certificado X.509 especificado no construtor não é do tipo RSA.algorithm is XmlDsigRSASHA1Url or RsaSha256Signature and the private key for the X.509 certificate specified in the constructor is not of type RSA.
- ou --or-
algorithm não é suportado.algorithm is not supported. Os algoritmos compatíveis são XmlDsigDSAUrl,The supported algorithms are XmlDsigDSAUrl,
XmlDsigRSASHA1Url e RsaSha256Signature.XmlDsigRSASHA1Url, and RsaSha256Signature.
Comentários
Use os XmlDsigDSAUrl XmlDsigRSASHA1Url campos, ou RsaSha256Signature para especificar o algorithm parâmetro.Use the XmlDsigDSAUrl, XmlDsigRSASHA1Url or RsaSha256Signature fields to specify the algorithm parameter.
Devido a problemas de colisão com o SHA1, a Microsoft recomenda um modelo de segurança baseado em SHA256 ou melhor.Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.