Show / Hide Table of Contents

Class XmlSecurityUtility

XML Security utility class.

Inheritance
object
XmlSecurityUtility
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ComponentSpace.Saml2.XmlSecurity
Assembly: ComponentSpace.Saml2.dll
Syntax
public static class XmlSecurityUtility

Methods

GetCertificate(XmlElement)

Gets the X.509 certificate embedded in the signature.

Declaration
public static byte[] GetCertificate(XmlElement xmlElement)
Parameters
Type Name Description
XmlElement xmlElement

The signed XML element.

Returns
Type Description
byte[]

The X.509 certificate bytes or null if none.

GetDigestAlgorithm(XmlElement)

Gets the digest algorithm.

Declaration
public static string GetDigestAlgorithm(XmlElement xmlElement)
Parameters
Type Name Description
XmlElement xmlElement

The signed XML element.

Returns
Type Description
string

The XML digest algorithm or null if none.

GetSignatureAlgorithm(XmlElement)

Gets the signature algorithm.

Declaration
public static string GetSignatureAlgorithm(XmlElement xmlElement)
Parameters
Type Name Description
XmlElement xmlElement

The signed XML element.

Returns
Type Description
string

The XML signature algorithm or null if none.

GetSignatureElement(XmlElement)

Gets the XML signature element.

Declaration
public static XmlElement GetSignatureElement(XmlElement xmlElement)
Parameters
Type Name Description
XmlElement xmlElement

The signed XML element.

Returns
Type Description
XmlElement

The XML signature element or null if none.

IsSigned(XmlElement)

Indicates whether the XML is signed.

Declaration
public static bool IsSigned(XmlElement xmlElement)
Parameters
Type Name Description
XmlElement xmlElement

The XML element.

Returns
Type Description
bool

true if the XML is signed; otherwise false.

In this article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2025. All rights reserved.