Interface IXmlSignature
Supports XML signatures.
Namespace: ComponentSpace.Saml2.XmlSecurity.Signature
Assembly: ComponentSpace.Saml2.dll
Syntax
public interface IXmlSignature
Methods
Generate(XmlElement, AsymmetricAlgorithm, String, String, String, X509Certificate2)
Generates an XML signature.
Declaration
XmlElement Generate(XmlElement unsignedElement, AsymmetricAlgorithm signingKey, string digestAlgorithm, string signatureAlgorithm, string inclusiveNamespacesPrefixList = null, X509Certificate2 x509Certificate = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
unsignedElement | The XML to sign. |
System. |
signingKey | The signing key. |
System. |
digestAlgorithm | The digest algorithm. |
System. |
signatureAlgorithm | The signature algorithm. |
System. |
inclusiveNamespacesPrefixList | The inclusive namespace prefix list or |
System. |
x509Certificate | The X.509 certificate to include in the signature or |
Returns
Type | Description |
---|---|
System. |
The XML signature. |
Exceptions
Type | Condition |
---|---|
Saml |
Thrown if an error occurs during signature generation. |
Verify(XmlElement, AsymmetricAlgorithm)
Verifies an XML signature.
Declaration
bool Verify(XmlElement signedElement, AsymmetricAlgorithm verifyingKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
signedElement | The signed XML. |
System. |
verifyingKey | The verifying key. |
Returns
Type | Description |
---|---|
System. |
|
Exceptions
Type | Condition |
---|---|
Saml |
Thrown if an error occurs during signature verification. |