Contains details for signing a PDF document with a digital signature.
At the moment digitally signing PDF documents is only available on .NET 2.0 or higher.
To digitally sign a PDF document when it is created by Aspose.Words, set the DigitalSignatureDetails property to a valid PdfDigitalSignatureDetails object and then save the document in the PDF format passing the PdfSaveOptions as a parameter into the Save() method.
Aspose.Words creates a PKCS#7 signature over the whole PDF document and uses the "Adobe.PPKMS" filter and "adbe.pkcs7.sha1" subfilter when creating a digital signature.
Shows how to sign a generated PDF document.
#include <Aspose.Words.Cpp/Saving/PdfDigitalSignatureDetails.h>
Public Member Functions | |
PdfDigitalSignatureDetails () | |
Initializes an instance of this class. More... | |
PdfDigitalSignatureDetails (const SharedPtr< CertificateHolder > &certificateHolder, const String &reason, const String &location, DateTime signatureDate) | |
Initializes an instance of this class. More... | |
SharedPtr< CertificateHolder > | get_CertificateHolder () const |
Returns the certificate holder object that contains the certificate was used to sign the document. More... | |
PdfDigitalSignatureHashAlgorithm | get_HashAlgorithm () const |
Gets or sets the hash algorithm. More... | |
String | get_Location () const |
Gets or sets the location of the signing. More... | |
String | get_Reason () const |
Gets or sets the reason for the signing. More... | |
DateTime | get_SignatureDate () const |
Gets or sets the date of the signing. More... | |
SharedPtr< PdfDigitalSignatureTimestampSettings > | get_TimestampSettings () const |
Gets or sets the digital signature timestamp settings. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | set_CertificateHolder (const SharedPtr< CertificateHolder > &value) |
Returns the certificate holder object that contains the certificate was used to sign the document. More... | |
void | set_HashAlgorithm (PdfDigitalSignatureHashAlgorithm value) |
Setter for get_HashAlgorithm. More... | |
void | set_Location (const String &value) |
Setter for get_Location. More... | |
void | set_Reason (const String &value) |
Setter for get_Reason. More... | |
void | set_SignatureDate (DateTime value) |
Setter for get_SignatureDate. More... | |
void | set_TimestampSettings (const SharedPtr< PdfDigitalSignatureTimestampSettings > &value) |
Setter for get_TimestampSettings. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
Aspose::Words::Saving::PdfDigitalSignatureDetails::PdfDigitalSignatureDetails | ( | ) |
Initializes an instance of this class.
Aspose::Words::Saving::PdfDigitalSignatureDetails::PdfDigitalSignatureDetails | ( | const System::SharedPtr< Aspose::Words::DigitalSignatures::CertificateHolder > & | certificateHolder, |
const System::String & | reason, | ||
const System::String & | location, | ||
System::DateTime | signatureDate | ||
) |
Initializes an instance of this class.
certificateHolder | A certificate holder which contains the certificate itself. |
reason | The reason for signing. |
location | The location of signing. |
signatureDate | The date and time of signing. |
Shows how to sign a generated PDF document.
System::SharedPtr<Aspose::Words::DigitalSignatures::CertificateHolder> Aspose::Words::Saving::PdfDigitalSignatureDetails::get_CertificateHolder | ( | ) | const |
Returns the certificate holder object that contains the certificate was used to sign the document.
Aspose::Words::Saving::PdfDigitalSignatureHashAlgorithm Aspose::Words::Saving::PdfDigitalSignatureDetails::get_HashAlgorithm | ( | ) | const |
Gets or sets the hash algorithm.
Shows how to sign a generated PDF document.
System::String Aspose::Words::Saving::PdfDigitalSignatureDetails::get_Location | ( | ) | const |
Gets or sets the location of the signing.
Shows how to sign a generated PDF document.
System::String Aspose::Words::Saving::PdfDigitalSignatureDetails::get_Reason | ( | ) | const |
Gets or sets the reason for the signing.
Shows how to sign a generated PDF document.
System::DateTime Aspose::Words::Saving::PdfDigitalSignatureDetails::get_SignatureDate | ( | ) | const |
Gets or sets the date of the signing.
The default value is the current time.
This value will appear in the digital signature as an unverified computer time.
Shows how to sign a generated PDF document.
System::SharedPtr<Aspose::Words::Saving::PdfDigitalSignatureTimestampSettings> Aspose::Words::Saving::PdfDigitalSignatureDetails::get_TimestampSettings | ( | ) | const |
Gets or sets the digital signature timestamp settings.
The default value is null and the digital signature will not be time-stamped. When this property is set to a valid PdfDigitalSignatureTimestampSettings object, then the digital signature in the PDF document will be time-stamped.
Shows how to sign a saved PDF document digitally and timestamp it.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
void Aspose::Words::Saving::PdfDigitalSignatureDetails::set_CertificateHolder | ( | const System::SharedPtr< Aspose::Words::DigitalSignatures::CertificateHolder > & | value | ) |
Returns the certificate holder object that contains the certificate was used to sign the document.
void Aspose::Words::Saving::PdfDigitalSignatureDetails::set_HashAlgorithm | ( | Aspose::Words::Saving::PdfDigitalSignatureHashAlgorithm | value | ) |
void Aspose::Words::Saving::PdfDigitalSignatureDetails::set_Location | ( | const System::String & | value | ) |
void Aspose::Words::Saving::PdfDigitalSignatureDetails::set_Reason | ( | const System::String & | value | ) |
void Aspose::Words::Saving::PdfDigitalSignatureDetails::set_SignatureDate | ( | System::DateTime | value | ) |
void Aspose::Words::Saving::PdfDigitalSignatureDetails::set_TimestampSettings | ( | const System::SharedPtr< Aspose::Words::Saving::PdfDigitalSignatureTimestampSettings > & | value | ) |
|
static |