Asposecpplib
System::Security::Cryptography::Xml::SignedXml Class Reference

Used for XML signing and verification. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...

Inherits System::Object.

Public Member Functions

ASPOSECPP_SHARED_API String get_SigningKeyName ()
 
ASPOSECPP_SHARED_API void set_SigningKeyName (String value)
 
ASPOSECPP_SHARED_API SharedPtr< AsymmetricAlgorithmget_SigningKey ()
 
ASPOSECPP_SHARED_API void set_SigningKey (SharedPtr< AsymmetricAlgorithm > value)
 
ASPOSECPP_SHARED_API SharedPtr< SignedInfoget_SignedInfo ()
 
ASPOSECPP_SHARED_API String get_SignatureMethod ()
 
ASPOSECPP_SHARED_API String get_SignatureLength ()
 
ASPOSECPP_SHARED_API ArrayPtr< uint8_t > get_SignatureValue ()
 
ASPOSECPP_SHARED_API SharedPtr< KeyInfoget_KeyInfo ()
 
ASPOSECPP_SHARED_API void set_KeyInfo (SharedPtr< KeyInfo > value)
 
ASPOSECPP_SHARED_API SignedXml ()
 
ASPOSECPP_SHARED_API SignedXml (SharedPtr< System::Xml::XmlDocument > document)
 
ASPOSECPP_SHARED_API SignedXml (SharedPtr< System::Xml::XmlElement > elem)
 
ASPOSECPP_SHARED_API SharedPtr< System::Xml::XmlElementGetXml ()
 
ASPOSECPP_SHARED_API void LoadXml (SharedPtr< System::Xml::XmlElement > value)
 
ASPOSECPP_SHARED_API void AddReference (SharedPtr< Reference > reference)
 
ASPOSECPP_SHARED_API void AddObject (SharedPtr< DataObject > dataObject)
 
ASPOSECPP_SHARED_API bool CheckSignature ()
 
ASPOSECPP_SHARED_API bool CheckSignatureReturningKey (SharedPtr< AsymmetricAlgorithm > &signingKey)
 
ASPOSECPP_SHARED_API bool CheckSignature (SharedPtr< AsymmetricAlgorithm > key)
 
ASPOSECPP_SHARED_API bool CheckSignature (SharedPtr< X509Certificates::X509Certificate2 > certificate, bool verifySignatureOnly)
 
ASPOSECPP_SHARED_API void ComputeSignature ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< System::Xml::XmlElementGetIdElement (SharedPtr< System::Xml::XmlDocument > document, String idValue)
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Static Public Attributes

static const ASPOSECPP_SHARED_API String XmlDsigNamespaceUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigMinimalCanonicalizationUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigCanonicalizationUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigCanonicalizationWithCommentsUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigSHA1Url
 
static const ASPOSECPP_SHARED_API String XmlDsigDSAUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigRSASHA1Url
 
static const ASPOSECPP_SHARED_API String XmlDsigHMACSHA1Url
 
static const ASPOSECPP_SHARED_API String XmlDsigSHA256Url
 
static const ASPOSECPP_SHARED_API String XmlDsigRSASHA256Url
 
static const ASPOSECPP_SHARED_API String XmlDsigSHA384Url
 
static const ASPOSECPP_SHARED_API String XmlDsigRSASHA384Url
 
static const ASPOSECPP_SHARED_API String XmlDsigSHA512Url
 
static const ASPOSECPP_SHARED_API String XmlDsigRSASHA512Url
 
static const ASPOSECPP_SHARED_API String XmlDsigC14NTransformUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigC14NWithCommentsTransformUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigExcC14NTransformUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigExcC14NWithCommentsTransformUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigBase64TransformUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigXPathTransformUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigXsltTransformUrl
 
static const ASPOSECPP_SHARED_API String XmlDsigEnvelopedSignatureTransformUrl
 
static const ASPOSECPP_SHARED_API String XmlDecryptionTransformUrl
 
static const ASPOSECPP_SHARED_API String XmlLicenseTransformUrl
 

Protected Member Functions

SharedPtr< Collections::ObjectModel::Collection< String > > get_SafeCanonicalizationMethods ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< AsymmetricAlgorithmGetPublicKey ()
 
virtual ASPOSECPP_SHARED_API ~SignedXml ()
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 

Detailed Description

Used for XML signing and verification. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

Constructor & Destructor Documentation

◆ SignedXml() [1/3]

ASPOSECPP_SHARED_API System::Security::Cryptography::Xml::SignedXml::SignedXml ( )

◆ SignedXml() [2/3]

ASPOSECPP_SHARED_API System::Security::Cryptography::Xml::SignedXml::SignedXml ( SharedPtr< System::Xml::XmlDocument document)

◆ SignedXml() [3/3]

ASPOSECPP_SHARED_API System::Security::Cryptography::Xml::SignedXml::SignedXml ( SharedPtr< System::Xml::XmlElement elem)

◆ ~SignedXml()

virtual ASPOSECPP_SHARED_API System::Security::Cryptography::Xml::SignedXml::~SignedXml ( )
protectedvirtual

Member Function Documentation

◆ AddObject()

ASPOSECPP_SHARED_API void System::Security::Cryptography::Xml::SignedXml::AddObject ( SharedPtr< DataObject dataObject)

◆ AddReference()

ASPOSECPP_SHARED_API void System::Security::Cryptography::Xml::SignedXml::AddReference ( SharedPtr< Reference reference)

◆ CheckSignature() [1/3]

ASPOSECPP_SHARED_API bool System::Security::Cryptography::Xml::SignedXml::CheckSignature ( )

◆ CheckSignature() [2/3]

ASPOSECPP_SHARED_API bool System::Security::Cryptography::Xml::SignedXml::CheckSignature ( SharedPtr< AsymmetricAlgorithm key)

◆ CheckSignature() [3/3]

ASPOSECPP_SHARED_API bool System::Security::Cryptography::Xml::SignedXml::CheckSignature ( SharedPtr< X509Certificates::X509Certificate2 certificate,
bool  verifySignatureOnly 
)

◆ CheckSignatureReturningKey()

ASPOSECPP_SHARED_API bool System::Security::Cryptography::Xml::SignedXml::CheckSignatureReturningKey ( SharedPtr< AsymmetricAlgorithm > &  signingKey)

◆ ComputeSignature()

ASPOSECPP_SHARED_API void System::Security::Cryptography::Xml::SignedXml::ComputeSignature ( )

◆ get_KeyInfo()

ASPOSECPP_SHARED_API SharedPtr<KeyInfo> System::Security::Cryptography::Xml::SignedXml::get_KeyInfo ( )

◆ get_SafeCanonicalizationMethods()

SharedPtr<Collections::ObjectModel::Collection<String> > System::Security::Cryptography::Xml::SignedXml::get_SafeCanonicalizationMethods ( )
protected

◆ get_SignatureLength()

ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::get_SignatureLength ( )

◆ get_SignatureMethod()

ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::get_SignatureMethod ( )

◆ get_SignatureValue()

ASPOSECPP_SHARED_API ArrayPtr<uint8_t> System::Security::Cryptography::Xml::SignedXml::get_SignatureValue ( )

◆ get_SignedInfo()

ASPOSECPP_SHARED_API SharedPtr<SignedInfo> System::Security::Cryptography::Xml::SignedXml::get_SignedInfo ( )

◆ get_SigningKey()

ASPOSECPP_SHARED_API SharedPtr<AsymmetricAlgorithm> System::Security::Cryptography::Xml::SignedXml::get_SigningKey ( )

◆ get_SigningKeyName()

ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::get_SigningKeyName ( )

◆ GetIdElement()

virtual ASPOSECPP_SHARED_API SharedPtr<System::Xml::XmlElement> System::Security::Cryptography::Xml::SignedXml::GetIdElement ( SharedPtr< System::Xml::XmlDocument document,
String  idValue 
)
virtual

◆ GetPublicKey()

virtual ASPOSECPP_SHARED_API SharedPtr<AsymmetricAlgorithm> System::Security::Cryptography::Xml::SignedXml::GetPublicKey ( )
protectedvirtual

◆ GetXml()

ASPOSECPP_SHARED_API SharedPtr<System::Xml::XmlElement> System::Security::Cryptography::Xml::SignedXml::GetXml ( )

◆ LoadXml()

ASPOSECPP_SHARED_API void System::Security::Cryptography::Xml::SignedXml::LoadXml ( SharedPtr< System::Xml::XmlElement value)

◆ set_KeyInfo()

ASPOSECPP_SHARED_API void System::Security::Cryptography::Xml::SignedXml::set_KeyInfo ( SharedPtr< KeyInfo value)

◆ set_SigningKey()

ASPOSECPP_SHARED_API void System::Security::Cryptography::Xml::SignedXml::set_SigningKey ( SharedPtr< AsymmetricAlgorithm value)

◆ set_SigningKeyName()

ASPOSECPP_SHARED_API void System::Security::Cryptography::Xml::SignedXml::set_SigningKeyName ( String  value)

Member Data Documentation

◆ XmlDecryptionTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDecryptionTransformUrl
static

◆ XmlDsigBase64TransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigBase64TransformUrl
static

◆ XmlDsigC14NTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigC14NTransformUrl
static

◆ XmlDsigC14NWithCommentsTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigC14NWithCommentsTransformUrl
static

◆ XmlDsigCanonicalizationUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigCanonicalizationUrl
static

◆ XmlDsigCanonicalizationWithCommentsUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigCanonicalizationWithCommentsUrl
static

◆ XmlDsigDSAUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigDSAUrl
static

◆ XmlDsigEnvelopedSignatureTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigEnvelopedSignatureTransformUrl
static

◆ XmlDsigExcC14NTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigExcC14NTransformUrl
static

◆ XmlDsigExcC14NWithCommentsTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigExcC14NWithCommentsTransformUrl
static

◆ XmlDsigHMACSHA1Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigHMACSHA1Url
static

◆ XmlDsigMinimalCanonicalizationUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigMinimalCanonicalizationUrl
static

◆ XmlDsigNamespaceUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigNamespaceUrl
static

◆ XmlDsigRSASHA1Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigRSASHA1Url
static

◆ XmlDsigRSASHA256Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigRSASHA256Url
static

◆ XmlDsigRSASHA384Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigRSASHA384Url
static

◆ XmlDsigRSASHA512Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigRSASHA512Url
static

◆ XmlDsigSHA1Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigSHA1Url
static

◆ XmlDsigSHA256Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigSHA256Url
static

◆ XmlDsigSHA384Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigSHA384Url
static

◆ XmlDsigSHA512Url

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigSHA512Url
static

◆ XmlDsigXPathTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigXPathTransformUrl
static

◆ XmlDsigXsltTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlDsigXsltTransformUrl
static

◆ XmlLicenseTransformUrl

const ASPOSECPP_SHARED_API String System::Security::Cryptography::Xml::SignedXml::XmlLicenseTransformUrl
static