Table of Contents

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

string

EcdsaSha256

ECDSA with SHA-256.

public const string EcdsaSha256 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"

Field Value

string

EcdsaSha384

ECDSA with SHA-384.

public const string EcdsaSha384 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"

Field Value

string

EcdsaSha512

ECDSA with SHA-512.

public const string EcdsaSha512 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"

Field Value

string

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

string

ExcC14N

Exclusive Canonical XML 1.0 (omit comments).

public const string ExcC14N = "http://www.w3.org/2001/10/xml-exc-c14n#"

Field Value

string

RsaPssSha256

RSA-PSS with SHA-256.

public const string RsaPssSha256 = "http://www.w3.org/2007/05/xmldsig-more#sha256-rsa-MGF1"

Field Value

string

RsaPssSha384

RSA-PSS with SHA-384.

public const string RsaPssSha384 = "http://www.w3.org/2007/05/xmldsig-more#sha384-rsa-MGF1"

Field Value

string

RsaPssSha512

RSA-PSS with SHA-512.

public const string RsaPssSha512 = "http://www.w3.org/2007/05/xmldsig-more#sha512-rsa-MGF1"

Field Value

string

RsaSha1

RSA with SHA-1 (legacy).

public const string RsaSha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"

Field Value

string

RsaSha256

RSA with SHA-256.

public const string RsaSha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"

Field Value

string

RsaSha384

RSA with SHA-384.

public const string RsaSha384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"

Field Value

string

RsaSha512

RSA with SHA-512.

public const string RsaSha512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"

Field Value

string

Sha1Digest

SHA-1 digest (legacy).

public const string Sha1Digest = "http://www.w3.org/2000/09/xmldsig#sha1"

Field Value

string

Sha256Digest

SHA-256 digest (XML Encryption §8).

public const string Sha256Digest = "http://www.w3.org/2001/04/xmlenc#sha256"

Field Value

string

Sha384Digest

SHA-384 digest (RFC 6931).

public const string Sha384Digest = "http://www.w3.org/2001/04/xmldsig-more#sha384"

Field Value

string

Sha3_256Digest

SHA3-256 digest (RFC 6931).

public const string Sha3_256Digest = "http://www.w3.org/2001/04/xmldsig-more#sha3-256"

Field Value

string

Sha3_384Digest

SHA3-384 digest (RFC 6931).

public const string Sha3_384Digest = "http://www.w3.org/2001/04/xmldsig-more#sha3-384"

Field Value

string

Sha3_512Digest

SHA3-512 digest (RFC 6931).

public const string Sha3_512Digest = "http://www.w3.org/2001/04/xmldsig-more#sha3-512"

Field Value

string

Sha512Digest

SHA-512 digest (XML Encryption §8).

public const string Sha512Digest = "http://www.w3.org/2001/04/xmlenc#sha512"

Field Value

string

Methods

GetDigestUri(HashAlgorithmName)

Maps a HashAlgorithmName to an XMLDSig digest URI.

public static string GetDigestUri(HashAlgorithmName algorithm)

Parameters

algorithm HashAlgorithmName

Returns

string

GetHashAlgorithmFromUri(string)

Maps an XMLDSig digest URI back to a HashAlgorithmName.

public static HashAlgorithmName GetHashAlgorithmFromUri(string digestUri)

Parameters

digestUri string

Returns

HashAlgorithmName

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

certificate X509Certificate2
hashAlgorithm HashAlgorithmName

Returns

string

GetSignatureMethodUri(string)

Maps a signature algorithm OID to an XMLDSig signature method URI.

public static string GetSignatureMethodUri(string signatureAlgorithmOid)

Parameters

signatureAlgorithmOid string

Returns

string

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

signatureAlgorithmOid string
hashAlgorithm HashAlgorithmName

Returns

string