Class XmlDSigUrls
- Namespace
- SimpleSign.Core.Constants
- Assembly
- SimpleSign.Core.dll
Standard URIs for XML Digital Signatures (W3C XMLDSig).
public static class XmlDSigUrls
- Inheritance
-
XmlDSigUrls
- Inherited Members
Fields
DsNamespace
W3C XML Digital Signature namespace.
public const string DsNamespace = "http://www.w3.org/2000/09/xmldsig#"
Field Value
EcdsaSha256
ECDSA with SHA-256.
public const string EcdsaSha256 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
Field Value
EcdsaSha384
ECDSA with SHA-384.
public const string EcdsaSha384 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
Field Value
EcdsaSha512
ECDSA with SHA-512.
public const string EcdsaSha512 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
Field Value
EnvelopedSignatureTransform
Enveloped Signature Transform — removes the Signature element before hashing.
public const string EnvelopedSignatureTransform = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
Field Value
ExcC14N
Exclusive Canonical XML 1.0 (omit comments).
public const string ExcC14N = "http://www.w3.org/2001/10/xml-exc-c14n#"
Field Value
RsaPssSha256
RSA-PSS with SHA-256.
public const string RsaPssSha256 = "http://www.w3.org/2007/05/xmldsig-more#sha256-rsa-MGF1"
Field Value
RsaPssSha384
RSA-PSS with SHA-384.
public const string RsaPssSha384 = "http://www.w3.org/2007/05/xmldsig-more#sha384-rsa-MGF1"
Field Value
RsaPssSha512
RSA-PSS with SHA-512.
public const string RsaPssSha512 = "http://www.w3.org/2007/05/xmldsig-more#sha512-rsa-MGF1"
Field Value
RsaSha1
RSA with SHA-1 (legacy).
public const string RsaSha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
Field Value
RsaSha256
RSA with SHA-256.
public const string RsaSha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
Field Value
RsaSha384
RSA with SHA-384.
public const string RsaSha384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
Field Value
RsaSha512
RSA with SHA-512.
public const string RsaSha512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
Field Value
Sha1Digest
SHA-1 digest (legacy).
public const string Sha1Digest = "http://www.w3.org/2000/09/xmldsig#sha1"
Field Value
Sha256Digest
SHA-256 digest (XML Encryption §8).
public const string Sha256Digest = "http://www.w3.org/2001/04/xmlenc#sha256"
Field Value
Sha384Digest
SHA-384 digest (RFC 6931).
public const string Sha384Digest = "http://www.w3.org/2001/04/xmldsig-more#sha384"
Field Value
Sha3_256Digest
SHA3-256 digest (RFC 6931).
public const string Sha3_256Digest = "http://www.w3.org/2001/04/xmldsig-more#sha3-256"
Field Value
Sha3_384Digest
SHA3-384 digest (RFC 6931).
public const string Sha3_384Digest = "http://www.w3.org/2001/04/xmldsig-more#sha3-384"
Field Value
Sha3_512Digest
SHA3-512 digest (RFC 6931).
public const string Sha3_512Digest = "http://www.w3.org/2001/04/xmldsig-more#sha3-512"
Field Value
Sha512Digest
SHA-512 digest (XML Encryption §8).
public const string Sha512Digest = "http://www.w3.org/2001/04/xmlenc#sha512"
Field Value
Methods
GetDigestUri(HashAlgorithmName)
Maps a HashAlgorithmName to an XMLDSig digest URI.
public static string GetDigestUri(HashAlgorithmName algorithm)
Parameters
algorithmHashAlgorithmName
Returns
GetHashAlgorithmFromUri(string)
Maps an XMLDSig digest URI back to a HashAlgorithmName.
public static HashAlgorithmName GetHashAlgorithmFromUri(string digestUri)
Parameters
digestUristring
Returns
GetSignatureMethodUri(X509Certificate2, HashAlgorithmName)
Maps a certificate key algorithm and hash to an XMLDSig signature method URI.
public static string GetSignatureMethodUri(X509Certificate2 certificate, HashAlgorithmName hashAlgorithm)
Parameters
certificateX509Certificate2hashAlgorithmHashAlgorithmName
Returns
GetSignatureMethodUri(string)
Maps a signature algorithm OID to an XMLDSig signature method URI.
public static string GetSignatureMethodUri(string signatureAlgorithmOid)
Parameters
signatureAlgorithmOidstring
Returns
GetSignatureMethodUri(string, HashAlgorithmName)
Maps a signature algorithm OID and hash algorithm to an XMLDSig signature method URI. Supports RSA-PSS where the hash algorithm determines the specific PSS URI.
public static string GetSignatureMethodUri(string signatureAlgorithmOid, HashAlgorithmName hashAlgorithm)
Parameters
signatureAlgorithmOidstringhashAlgorithmHashAlgorithmName