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

String get_SigningKeyName ()
 
void set_SigningKeyName (String value)
 
SharedPtr< AsymmetricAlgorithmget_SigningKey ()
 
void set_SigningKey (SharedPtr< AsymmetricAlgorithm > value)
 
SharedPtr< SignedInfoget_SignedInfo ()
 
String get_SignatureMethod ()
 
String get_SignatureLength ()
 
ArrayPtr< uint8_tget_SignatureValue ()
 
SharedPtr< KeyInfoget_KeyInfo ()
 
void set_KeyInfo (SharedPtr< KeyInfo > value)
 
 SignedXml ()
 
 SignedXml (SharedPtr< System::Xml::XmlDocument > document)
 
 SignedXml (SharedPtr< System::Xml::XmlElement > elem)
 
SharedPtr< System::Xml::XmlElementGetXml ()
 
void LoadXml (SharedPtr< System::Xml::XmlElement > value)
 
void AddReference (SharedPtr< Reference > reference)
 
void AddObject (SharedPtr< DataObject > dataObject)
 
bool CheckSignature ()
 
bool CheckSignatureReturningKey (SharedPtr< AsymmetricAlgorithm > &signingKey)
 
bool CheckSignature (SharedPtr< AsymmetricAlgorithm > key)
 
bool CheckSignature (SharedPtr< X509Certificates::X509Certificate2 > certificate, bool verifySignatureOnly)
 
void ComputeSignature ()
 
virtual SharedPtr< System::Xml::XmlElementGetIdElement (SharedPtr< System::Xml::XmlDocument > document, String idValue)
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 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...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual 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 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 String XmlDsigNamespaceUrl
 
static const String XmlDsigMinimalCanonicalizationUrl
 
static const String XmlDsigCanonicalizationUrl
 
static const String XmlDsigCanonicalizationWithCommentsUrl
 
static const String XmlDsigSHA1Url
 
static const String XmlDsigDSAUrl
 
static const String XmlDsigRSASHA1Url
 
static const String XmlDsigHMACSHA1Url
 
static const String XmlDsigSHA256Url
 
static const String XmlDsigRSASHA256Url
 
static const String XmlDsigSHA384Url
 
static const String XmlDsigRSASHA384Url
 
static const String XmlDsigSHA512Url
 
static const String XmlDsigRSASHA512Url
 
static const String XmlDsigC14NTransformUrl
 
static const String XmlDsigC14NWithCommentsTransformUrl
 
static const String XmlDsigExcC14NTransformUrl
 
static const String XmlDsigExcC14NWithCommentsTransformUrl
 
static const String XmlDsigBase64TransformUrl
 
static const String XmlDsigXPathTransformUrl
 
static const String XmlDsigXsltTransformUrl
 
static const String XmlDsigEnvelopedSignatureTransformUrl
 
static const String XmlDecryptionTransformUrl
 
static const String XmlLicenseTransformUrl
 

Protected Member Functions

SharedPtr< Collections::ObjectModel::Collection< String > > get_SafeCanonicalizationMethods ()
 
virtual SharedPtr< AsymmetricAlgorithmGetPublicKey ()
 
virtual ~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]

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

◆ SignedXml() [2/3]

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

◆ SignedXml() [3/3]

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

◆ ~SignedXml()

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

Member Function Documentation

◆ AddObject()

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

◆ AddReference()

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

◆ CheckSignature() [1/3]

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

◆ CheckSignature() [2/3]

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

◆ CheckSignature() [3/3]

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

◆ CheckSignatureReturningKey()

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

◆ ComputeSignature()

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

◆ get_KeyInfo()

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()

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

◆ get_SignatureMethod()

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

◆ get_SignatureValue()

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

◆ get_SignedInfo()

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

◆ get_SigningKey()

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

◆ get_SigningKeyName()

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

◆ GetIdElement()

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

◆ GetPublicKey()

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

◆ GetXml()

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

◆ LoadXml()

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

◆ set_KeyInfo()

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

◆ set_SigningKey()

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

◆ set_SigningKeyName()

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

Member Data Documentation

◆ XmlDecryptionTransformUrl

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

◆ XmlDsigBase64TransformUrl

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

◆ XmlDsigC14NTransformUrl

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

◆ XmlDsigC14NWithCommentsTransformUrl

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

◆ XmlDsigCanonicalizationUrl

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

◆ XmlDsigCanonicalizationWithCommentsUrl

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

◆ XmlDsigDSAUrl

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

◆ XmlDsigEnvelopedSignatureTransformUrl

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

◆ XmlDsigExcC14NTransformUrl

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

◆ XmlDsigExcC14NWithCommentsTransformUrl

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

◆ XmlDsigHMACSHA1Url

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

◆ XmlDsigMinimalCanonicalizationUrl

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

◆ XmlDsigNamespaceUrl

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

◆ XmlDsigRSASHA1Url

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

◆ XmlDsigRSASHA256Url

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

◆ XmlDsigRSASHA384Url

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

◆ XmlDsigRSASHA512Url

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

◆ XmlDsigSHA1Url

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

◆ XmlDsigSHA256Url

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

◆ XmlDsigSHA384Url

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

◆ XmlDsigSHA512Url

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

◆ XmlDsigXPathTransformUrl

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

◆ XmlDsigXsltTransformUrl

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

◆ XmlLicenseTransformUrl

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