Foxit PDF SDK

fs_signature.h
Go to the documentation of this file.
1
15 #ifndef FS_SIGNATURE_H_
16 #define FS_SIGNATURE_H_
17
18 #include "common/fs_common.h"
19 #include "common/file/fs_file.h"
20 #include "common/fs_image.h"
21 #include "pdf/interform/fs_pdfform.h"
22
28 namespace foxit {
32 namespace pdf {
33 class PagingSealSignature;
34
35 class Signature;
37 FSDK_DEFINE_ARRAY(SignatureArray, Signature)
38
39
99 class Signature : public interform::Field {
100 public:
117 typedef enum _States {
119 e_StateUnknown = 0x80000000,
121 e_StateNoSignData = 0x00000200,
123 e_StateUnsigned = 0x00000001,
125 e_StateSigned = 0x00000002,
127 e_StateVerifyValid = 0x00000004,
129 e_StateVerifyInvalid = 0x00000008,
131 e_StateVerifyErrorData = 0x00000010,
133 e_StateVerifyNoSupportWay = 0x00000020,
135 e_StateVerifyErrorByteRange = 0x00000040,
137 e_StateVerifyChange = 0x00000080,
139 e_StateVerifyIncredible = 0x00000100,
141 e_StateVerifyNoChange = 0x00000400,
143 e_StateVerifyIssueValid = 0x00001000,
145 e_StateVerifyIssueUnknown = 0x00002000,
147 e_StateVerifyIssueRevoke = 0x00004000,
149 e_StateVerifyIssueExpire = 0x00008000,
151 e_StateVerifyIssueUncheck = 0x00010000,
153 e_StateVerifyIssueCurrent = 0x00020000,
155 e_StateVerifyTimestampNone = 0x00040000,
157 e_StateVerifyTimestampDoc = 0x00080000,
159 e_StateVerifyTimestampValid = 0x00100000,
161 e_StateVerifyTimestampInvalid = 0x00200000,
163 e_StateVerifyTimestampExpire = 0x00400000,
165 e_StateVerifyTimestampIssueUnknown = 0x00800000,
167 e_StateVerifyTimestampIssueValid = 0x01000000,
169 e_StateVerifyTimestampTimeBefore = 0x02000000,
171 e_StateCertCannotGetVRI = 0x04000000,
173 e_StateVerifyChangeLegal = 0x08000000,
175 e_StateVerifyChangeIllegal = 0x10000000
176 } States;
177
183 typedef enum _APFlags {
185 e_APFlagFoxitFlag = 0x0001,
187 e_APFlagLabel = 0x0002,
189 e_APFlagReason = 0x0004,
191 e_APFlagSigningTime = 0x0008,
193 e_APFlagDN = 0x0010,
195 e_APFlagLocation = 0x0020,
197 e_APFlagSigner = 0x0040,
199 e_APFlagBitmap = 0x0080,
201 e_APFlagText = 0x0100,
203 e_APFlagFoxitEditorFlag = 0x0200,
205 e_APFlagProducer = 0x0400
206 } APFlags;
207
213 typedef enum _KeyName {
215 e_KeyNameSigner = 0,
217 e_KeyNameLocation = 1,
219 e_KeyNameReason = 2,
221 e_KeyNameContactInfo = 3,
223 e_KeyNameDN = 4,
225 e_KeyNameText = 5,
227 e_KeyNameProducer = 6
228 } KeyName;
229
235 typedef enum _DigestAlgorithm {
237 e_DigestSHA1 = 0,
239 e_DigestSHA256 = 1,
241 e_DigestSHA384 = 2,
243 e_DigestSHA512 = 3
244 } DigestAlgorithm;
245
251 typedef enum _SignatureType {
253 e_SignatureTypeOrdinary = 0,
255 e_SignatureTypeTimeStamp = 3,
257 e_SignatureTypePagingSeal = 4
258 } SignatureType;
259
265 typedef enum _PAdESLevel {
267 e_PAdESLevelNotPAdES = 0,
269 e_PAdESLevelNone = 1,
271 e_PAdESLevelBB = 2,
273 e_PAdESLevelBT = 3,
275 e_PAdESLevelBLT = 4,
277 e_PAdESLevelBLTA = 5
278 } PAdESLevel;
279
285 typedef enum _DocPermission {
287 e_DocPermUnrestricted = 0,
292 e_DocPermNoChangesAllowed = 1,
297 e_DocPermFillingFormAndSigning = 2,
302 e_DocPermFillingFormSigningAndAnnotating = 3
303 } DocPermission;
304
310 typedef enum _FieldMDPAction {
312 e_FieldMDPActionNone = 0,
316 e_FieldMDPActionAll = 1,
322 e_FieldMDPActionInclude = 2,
328 e_FieldMDPActionExclude = 3
329 } FieldMDPAction;
330
336 typedef enum _LabelName {
342 e_LabelNameSigner = 0,
348 e_LabelNameLocation = 1,
354 e_LabelNameReason = 2,
360 e_LabelNameSignTime = 3,
366 e_LabelNameDN = 4,
372 e_LabelNameProducer = 6
373 } LabelName;
374
375
381 explicit Signature(const interform::Field& field);
382
390 Signature(const foxit::pdf::PDFDoc& document, foxit::pdf::objects::PDFDictionary* sig_field_dict);
391
393 ~Signature() {}
394
402 bool IsEmpty() const;
403
409 bool IsSigned();
410
429 void SetDocPermission(DocPermission permission);
430
443 DocPermission GetDocPermission();
444
468 void SetFieldMDPActionFields(const FieldMDPAction& action, const WStringArray& field_array);
469
476 FieldMDPAction GetFieldMDPAction();
477
493 WStringArray GetFieldMDPActionFields();
494
505 void EnableIncrementalSaveForFirstSigning(bool enable_incremental_save);
506
565 common::Progressive StartSign(const wchar_t* cert_path, const WString& cert_password,
566 DigestAlgorithm digest_algorithm, const char* save_path,
567 const void* client_data = NULL, common::PauseCallback* pause = NULL);
568
626 common::Progressive StartSign(foxit::common::file::StreamCallback* cert_file_stream, const WString& cert_password,
627 DigestAlgorithm digest_algorithm, const char* save_path,
628 const void* client_data = NULL, common::PauseCallback* pause = NULL);
629
686 common::Progressive StartSign(const wchar_t* cert_path, const WString& cert_password,
687 DigestAlgorithm digest_algorithm, const wchar_t* save_path,
688 const void* client_data = NULL, common::PauseCallback* pause = NULL);
689
745 common::Progressive StartSign(foxit::common::file::StreamCallback* cert_file_stream, const WString& cert_password,
746 DigestAlgorithm digest_algorithm, const wchar_t* save_path,
747 const void* client_data = NULL, common::PauseCallback* pause = NULL);
748
807 common::Progressive StartSign(const wchar_t* cert_path, const foxit::WString& cert_password,
808 foxit::pdf::Signature::DigestAlgorithm digest_algorithm, foxit::common::file::StreamCallback* stream_callback,
809 const void* client_data = NULL, foxit::common::PauseCallback* pause = NULL);
810
868 common::Progressive StartSign(foxit::common::file::StreamCallback* cert_file_stream, const foxit::WString& cert_password,
869 foxit::pdf::Signature::DigestAlgorithm digest_algorithm, foxit::common::file::StreamCallback* stream_callback,
870 const void* client_data = NULL, foxit::common::PauseCallback* pause = NULL);
871
903 common::Progressive StartVerify(const void* client_data = NULL, common::PauseCallback* pause = NULL);
904
924 String GetCertificateInfo(const char* key);
925
940 bool GetByteRangeArray(uint32 out_byte_range_array[4]);
941
968 uint32 GetState();
969
980 bool ClearSignedData();
981
987 PDFDoc GetDocument();
988
1002 PDFDoc GetSignedVersionDocument(const wchar_t* file_path);
1003
1014 uint32 GetAppearanceFlags();
1015
1032 void SetAppearanceFlags(uint32 appearance_flags);
1033
1053 void SetAppearanceContent(const String& appearance_content);
1054
1061 DateTime GetSignTime();
1062
1073 void SetSignTime(const DateTime& sign_time);
1074
1083 String GetFilter();
1084
1105 void SetFilter(const char* filter);
1106
1115 String GetSubFilter();
1116
1137 void SetSubFilter(const char* sub_filter);
1138
1150 WString GetKeyValue(KeyName key);
1151
1167 void SetKeyValue(KeyName key, const wchar_t* value);
1168
1186 void SetKeyLabel(LabelName label_name, const wchar_t* label_value);
1187
1198 WString GetKeyLabel(LabelName label_name);
1199
1206 common::Bitmap GetBitmap();
1207
1220 void SetBitmap(const common::Bitmap& bitmap);
1221
1238 void SetImage(const common::Image& image, int frame_index);
1239
1256 void SetImage(const char* file_path, int frame_index);
1257
1274 void SetImage(const wchar_t* file_path, int frame_index);
1275
1283 objects::PDFDictionary* GetSignatureDict() const;
1284
1302 void SetDefaultContentsLength(uint32 default_length);
1303
1314 int32 GetCertCount() const;
1315
1330 WString GetCert(int32 index) const;
1331
1344 void SetCertChain(const WStringArray& cert_chain);
1345
1352 SignatureType GetSignatureType();
1353
1359 bool IsTimeStamp();
1360
1367 PAdESLevel GetPAdESLevel();
1368
1381 void SetCustomObject(const char* key, objects::PDFObject* pdf_object);
1382
1392 SignatureArray GetPagingSealGroupElements();
1393
1402 bool GenerateAppearance();
1403
1413 PagingSealSignature GetPagingSealSignature();
1414
1424 void EnableEmbedFont(bool enable_embed_font);
1425
1426 #if (_FX_OS_ == _FX_IOS_ || _FX_OS_ == _FX_ANDROID_ || defined(SWIG)) && !defined(_SWIG_JAVA_) && !defined(_SWIG_DOTNET_) && !defined(_SWIG_PYTHON_) && !defined(_OC_) && !defined(_SWIG_MACOC_) && !defined(_MAUI_) && !defined(_SWIG_NODEJS_) && !defined(_SWIG_GO_)
1427
1436 bool DetectModification();
1437 #endif
1438 #ifndef __EMSCRIPTEN_RENDER__
1439 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1440 explicit Signature(FS_HANDLE handle = NULL);
1441 #endif
1442 };
1443
1453 class SignatureCallback {
1454 public:
1460 typedef enum _CertValidity {
1462 e_CertValid = 0,
1464 e_CertExpired = 1,
1466 e_CertUnsupportType = 2,
1468 e_CertDataError = 3,
1470 e_CertInvalidPassword = 4,
1472 e_CertInvalidPath = 5,
1474 e_CertNotSet = 6,
1476 e_CertCannotGetPrivateKey = 7
1477 } CertValidity;
1478
1479
1485 virtual void Release() = 0;
1486
1505 virtual bool StartCalcDigest(const common::file::ReaderCallback* file, const uint32* byte_range_array,
1506 uint32 size_of_array, const Signature& signature, const void* client_data) = 0;
1507
1526 virtual common::Progressive::State ContinueCalcDigest(const void* client_data,
1527 const common::PauseCallback* pause) = 0;
1528
1540 virtual String GetDigest(const void* client_data) = 0;
1541
1563 virtual String Sign(const void* digest, uint32 digest_length, const wchar_t* cert_path,
1564 const WString& cert_password, Signature::DigestAlgorithm digest_algorithm,
1565 void* client_data) = 0;
1566
1589 virtual String Sign(const void* digest, uint32 digest_length, foxit::common::file::StreamCallback* cert_file_stream,
1590 const WString& cert_password, Signature::DigestAlgorithm digest_algorithm,
1591 void* client_data) = 0;
1592
1615 virtual uint32 VerifySigState(const void* digest, uint32 digest_length,
1616 const void* signed_data, uint32 signed_data_len,
1617 void* client_data) = 0;
1618
1626 virtual bool IsNeedPadData() = 0;
1627
1647 virtual CertValidity CheckCertificateValidity(const wchar_t* cert_path, const WString& cert_password, void* client_data) = 0;
1648
1649 protected:
1650 ~SignatureCallback() {}
1651 };
1652
1653 class TimeStampServer;
1654
1663 class TimeStampServerMgr FS_FINAL : public Object {
1664 public:
1673 static ErrorCode Initialize();
1683 static void Release();
1684
1690 static int GetServerCount();
1699 static TimeStampServer GetServer(int index);
1707 static int GetServerIndex(const TimeStampServer& server);
1708
1714 static TimeStampServer GetDefaultServer();
1723 static void SetDefaultServer(int index);
1733 static void SetDefaultServer(const TimeStampServer& server);
1734
1745 static TimeStampServer AddServer(const WString& server_name, const WString& server_url, const WString& user_name, const WString& password);
1753 static void RemoveServer(int index);
1763 static void RemoveServer(const TimeStampServer& server);
1764 };
1765
1769 class TimeStampServer FS_FINAL : public Base {
1770 public:
1776 typedef enum _SendRequestResult {
1778 e_SendResultSuccess = 0,
1780 e_SendResultFailToCreateSocket = 1,
1782 e_SendResultFailToConnect = 2,
1784 e_SendResultFailToSendData = 3,
1786 e_SendResultFailToReceiveData = 4,
1788 e_SendResultFailToRequest = 5,
1790 e_SendResultFailToGetData = 6,
1792 e_SendResultOutOfMemory = 7
1793 } SendRequestResult;
1794
1795
1801 TimeStampServer(const TimeStampServer& other);
1802
1810 TimeStampServer& operator = (const TimeStampServer& other);
1811
1819 bool operator == (const TimeStampServer& other) const;
1827 bool operator != (const TimeStampServer& other) const;
1828
1830 ~TimeStampServer();
1831
1839 bool IsEmpty() const;
1840
1849 SendRequestResult SendTimeStampRequest(const String& request);
1850
1858 String GetTimeStampMessage();
1859
1860 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1861 explicit TimeStampServer(FS_HANDLE handle = NULL);
1862 };
1863
1868 class TimeStampCallback {
1869 public:
1875 virtual void Release() = 0;
1876
1885 virtual TimeStampServer::SendRequestResult SendTimeStampRequest(const String& request) = 0;
1886
1892 virtual String GetTimeStampMessage() = 0;
1893
1894 protected:
1895 virtual ~TimeStampCallback() {}
1896 };
1897
1902 class PagingSealConfig FS_FINAL : public Object{
1903 public:
1909 typedef enum _PagingSealPosition {
1911 e_PagingSealPositionLeft = 1,
1913 e_PagingSealPositionRight = 2,
1915 e_PagingSealPositionTop = 3,
1917 e_PagingSealPositionBottom = 4
1918 } PagingSealPosition;
1919
1925 typedef enum _PagingSealStyle {
1930 e_PagingSealStyleMultipleSignatures = 0,
1935 e_PagingSealStyleOneSignature = 1
1936 } PagingSealStyle;
1937
1938
1954 PagingSealConfig(PagingSealPosition paging_seal_position, float offset, float first_page_percent, bool is_on_perforation,
1955 PagingSealStyle paging_seal_style = PagingSealConfig::e_PagingSealStyleMultipleSignatures, bool is_display_multiple_seal = false, int page_count_for_each_seal = 30);
1956
1964 PagingSealConfig& operator = (const PagingSealConfig& paging_seal_config) {
1965 this->paging_seal_position = paging_seal_config.paging_seal_position;
1966 this->offset = paging_seal_config.offset;
1967 this->first_page_percent = paging_seal_config.first_page_percent;
1968 this->is_on_perforation = paging_seal_config.is_on_perforation;
1969 this->paging_seal_style = paging_seal_config.paging_seal_style;
1970 this->is_display_multiple_seal = paging_seal_config.is_display_multiple_seal;
1971 this->page_count_for_each_seal = paging_seal_config.page_count_for_each_seal;
1972 return *this;
1973 }
1974
1982 bool operator == (const PagingSealConfig& paging_seal_config) const {
1983 if (this->paging_seal_position == paging_seal_config.paging_seal_position &&
1984 this->offset == paging_seal_config.offset &&
1985 this->first_page_percent == paging_seal_config.first_page_percent &&
1986 this->is_on_perforation == paging_seal_config.is_on_perforation &&
1987 this->paging_seal_style == paging_seal_config.paging_seal_style &&
1988 this->is_display_multiple_seal == paging_seal_config.is_display_multiple_seal &&
1989 this->page_count_for_each_seal == paging_seal_config.page_count_for_each_seal){
1990 return true;
1991 }
1992 return false;
1993 }
1994
2002 bool operator != (const PagingSealConfig& paging_seal_config) const {
2003 if (this->paging_seal_position != paging_seal_config.paging_seal_position ||
2004 this->offset != paging_seal_config.offset ||
2005 this->first_page_percent != paging_seal_config.first_page_percent ||
2006 this->is_on_perforation != paging_seal_config.is_on_perforation ||
2007 this->paging_seal_style != paging_seal_config.paging_seal_style ||
2008 this->is_display_multiple_seal != paging_seal_config.is_display_multiple_seal ||
2009 this->page_count_for_each_seal != paging_seal_config.page_count_for_each_seal) {
2010 return true;
2011 }
2012 return false;
2013 }
2014
2032 void Set(PagingSealPosition paging_seal_position, float offset, float first_page_percent, bool is_on_perforation, PagingSealStyle paging_seal_style,
2033 bool is_display_multiple_seal = false, int page_count_for_each_seal = 30);
2034
2039 PagingSealPosition paging_seal_position;
2051 float offset;
2056 float first_page_percent;
2062 bool is_on_perforation;
2069 PagingSealStyle paging_seal_style;
2075 bool is_display_multiple_seal;
2080 int page_count_for_each_seal;
2081 };
2082
2091 class PagingSealSignature FS_FINAL : public pdf::Signature {
2092 public:
2098 typedef enum _PagingSealAPState {
2100 e_PagingSealAPStateUnknown = 0,
2102 e_PagingSealAPStateUnsigned = 1,
2104 e_PagingSealAPStateSigned = 2,
2106 e_PagingSealAPStateValid = 3,
2108 e_PagingSealAPStateInvalid = 4
2109 } PagingSealAPState;
2110
2111
2113 ~PagingSealSignature() {}
2114
2122 void SetPagingSealConfig(PagingSealConfig paging_seal_config);
2123
2135 void SetAPStateBitmap(PagingSealAPState ap_state, const common::Bitmap& bitmap);
2136
2145 bool GenerateAppearance();
2146
2147 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2148 explicit PagingSealSignature(FS_HANDLE handle = NULL);
2149 };
2150
2151 } // namespace pdf
2152 } // namespace foxit
2153 #endif // FS_SIGNATURE_H_
2154
foxit::pdf::PagingSealSignature::e_PagingSealAPStateUnsigned
Unsigned signature.
Definition: fs_signature.h:2102
foxit::pdf::PagingSealSignature::~PagingSealSignature
~PagingSealSignature()
Destructor.
Definition: fs_signature.h:2113
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::pdf::TimeStampServerMgr::Release
static void Release()
Release time stamp server manager.
foxit::pdf::PagingSealConfig::e_PagingSealPositionRight
Right Paging Seal.
Definition: fs_signature.h:1913
foxit::pdf::TimeStampServer::operator=
TimeStampServer & operator=(const TimeStampServer &other)
Assign operator.
foxit::pdf::SignatureCallback::VerifySigState
virtual uint32 VerifySigState(const void *digest, uint32 digest_length, const void *signed_data, uint32 signed_data_len, void *client_data)=0
A callback function used to verify the integrity of a signature and return the verify state.
foxit::pdf::PagingSealSignature::e_PagingSealAPStateValid
Verification state of a signature is valid.
Definition: fs_signature.h:2106
foxit::DateTime
Definition: fs_basictypes.h:484
foxit::pdf::TimeStampServer::e_SendResultFailToCreateSocket
Fail to create socket during sending request process.
Definition: fs_signature.h:1780
foxit::pdf::PagingSealConfig::operator==
bool operator==(const PagingSealConfig &paging_seal_config) const
Equal operator.
Definition: fs_signature.h:1982
foxit::pdf::SignatureCallback::Sign
virtual String Sign(const void *digest, uint32 digest_length, const wchar_t *cert_path, const WString &cert_password, Signature::DigestAlgorithm digest_algorithm, void *client_data)=0
A callback function used to do signing and return the signed data.
foxit::pdf::TimeStampServer::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::Object
CFX_Object Object
Object type.
Definition: fs_basictypes.h:220
foxit::common::Progressive
Definition: fs_common.h:373
foxit::pdf::TimeStampServer
Definition: fs_signature.h:1769
foxit::pdf::TimeStampServerMgr::Initialize
static ErrorCode Initialize()
Initialize time stamp server manager.
fs_pdfform.h
Header file for PDF form related definitions and classes.
foxit::pdf::SignatureCallback::e_CertInvalidPath
Certificate's path is wrong.
Definition: fs_signature.h:1472
foxit::pdf::PagingSealConfig::e_PagingSealStyleOneSignature
Only add one signature. This signature is used for signature and verification and will be hidden in t...
Definition: fs_signature.h:1935
foxit::pdf::TimeStampServerMgr::RemoveServer
static void RemoveServer(int index)
Remove a time stamp server from the manager, by index.
IFX_FileStream
File stream interface, reading & writing.
Definition: fx_stream.h:692
foxit::pdf::TimeStampServer::operator!=
bool operator!=(const TimeStampServer &other) const
Not equal operator.
foxit::pdf::PagingSealSignature::PagingSealAPState
PagingSealAPState
Enumeration for paging seal signature state to set appearance.
Definition: fs_signature.h:2098
fs_common.h
Header file for common definitions and classes.
foxit::pdf::Signature::~Signature
~Signature()
Destructor.
Definition: fs_signature.h:393
foxit::pdf::TimeStampCallback::GetTimeStampMessage
virtual String GetTimeStampMessage()=0
A callback function used to get time stamp message.
foxit::pdf::PagingSealConfig::paging_seal_position
PagingSealPosition paging_seal_position
The position of paging seal. Please refer to values starting from PagingSealConfig::e_PagingSealPosit...
Definition: fs_signature.h:2039
foxit::pdf::SignatureCallback::CheckCertificateValidity
virtual CertValidity CheckCertificateValidity(const wchar_t *cert_path, const WString &cert_password, void *client_data)=0
A callback function used to check the validity of a certificate.
foxit::pdf::PagingSealConfig::e_PagingSealPositionTop
Top Paging Seal.
Definition: fs_signature.h:1915
IFX_FileRead
File reading interface.
Definition: fx_stream.h:587
fs_file.h
Header file for file operation related definitions and functions.
foxit::pdf::SignatureCallback::StartCalcDigest
virtual bool StartCalcDigest(const common::file::ReaderCallback *file, const uint32 *byte_range_array, uint32 size_of_array, const Signature &signature, const void *client_data)=0
A callback function used to start a custom digest calculation, mainly to initialize the calculation p...
foxit::ErrorCode
ErrorCode
Enumeration for error code.
Definition: fs_basictypes.h:236
foxit::pdf::SignatureCallback::CertValidity
CertValidity
Enumeration for certificate validity.
Definition: fs_signature.h:1460
foxit::pdf::SignatureCallback::e_CertInvalidPassword
Certificate's password is wrong.
Definition: fs_signature.h:1470
foxit::pdf::objects::PDFObject
Definition: fs_pdfobject.h:55
foxit::pdf::TimeStampServer::e_SendResultFailToGetData
Fail to get data during sending request process.
Definition: fs_signature.h:1790
foxit::pdf::TimeStampServer::e_SendResultFailToReceiveData
Fail to receive data during sending request process.
Definition: fs_signature.h:1786
foxit::pdf::PagingSealConfig::operator=
PagingSealConfig & operator=(const PagingSealConfig &paging_seal_config)
Assign operator.
Definition: fs_signature.h:1964
foxit::pdf::PagingSealConfig::page_count_for_each_seal
int page_count_for_each_seal
The page count of each seal. This value only useful when the parameter is_display_multiple_seal is tr...
Definition: fs_signature.h:2080
foxit::pdf::TimeStampServer::SendRequestResult
SendRequestResult
Enumeration for the result of sending time stamp request.
Definition: fs_signature.h:1776
foxit::pdf::TimeStampCallback
Definition: fs_signature.h:1868
foxit::pdf::SignatureCallback::Release
virtual void Release()=0
A callback function used to release current callback object itself.
foxit::pdf::SignatureCallback::e_CertCannotGetPrivateKey
Certificate's private key cannot be gotten.
Definition: fs_signature.h:1476
foxit::pdf::SignatureCallback::ContinueCalcDigest
virtual common::Progressive::State ContinueCalcDigest(const void *client_data, const common::PauseCallback *pause)=0
A callback function used to continue the custom digest calculation process.
foxit::pdf::interform::Field
Definition: fs_pdfform.h:145
CFX_ByteString
BYTE STRING CLASS.
Definition: fx_string.h:317
foxit::pdf::PagingSealConfig::PagingSealPosition
PagingSealPosition
Enumeration for paging seal position.
Definition: fs_signature.h:1909
foxit::pdf::TimeStampServer::e_SendResultFailToConnect
Fail to connect during sending request process.
Definition: fs_signature.h:1782
foxit::pdf::TimeStampServerMgr::SetDefaultServer
static void SetDefaultServer(int index)
Set default time stamp server object by index.
foxit::pdf::Signature
Definition: fs_signature.h:99
foxit::pdf::TimeStampServer::operator==
bool operator==(const TimeStampServer &other) const
Equal operator.
foxit::pdf::SignatureCallback::e_CertDataError
Certificate's data is error.
Definition: fs_signature.h:1468
foxit::pdf::SignatureCallback::e_CertExpired
Certificate is expired.
Definition: fs_signature.h:1464
foxit::pdf::PagingSealSignature::e_PagingSealAPStateUnknown
Unknown signature.
Definition: fs_signature.h:2100
foxit::pdf::PagingSealConfig::PagingSealStyle
PagingSealStyle
Enumeration for paging seal signature style.
Definition: fs_signature.h:1925
foxit::pdf::TimeStampServerMgr::AddServer
static TimeStampServer AddServer(const WString &server_name, const WString &server_url, const WString &user_name, const WString &password)
Add a time stamp server to the manager.
foxit::pdf::TimeStampServerMgr::GetServerCount
static int GetServerCount()
Get time stamp server count.
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::PagingSealConfig::PagingSealConfig
PagingSealConfig(PagingSealPosition paging_seal_position, float offset, float first_page_percent, bool is_on_perforation, PagingSealStyle paging_seal_style=PagingSealConfig::e_PagingSealStyleMultipleSignatures, bool is_display_multiple_seal=false, int page_count_for_each_seal=30)
Constructor, with parameter.
foxit::pdf::TimeStampServer::SendTimeStampRequest
SendRequestResult SendTimeStampRequest(const String &request)
Send time stamp request.
foxit::pdf::PagingSealSignature::GenerateAppearance
bool GenerateAppearance()
Generate the appearance of paging seal signature.
foxit::pdf::PagingSealConfig::offset
float offset
The offset of paging seal signature.
Definition: fs_signature.h:2051
foxit::pdf::TimeStampServer::GetTimeStampMessage
String GetTimeStampMessage()
Get time stamp message.
foxit::pdf::PagingSealConfig::operator!=
bool operator!=(const PagingSealConfig &paging_seal_config) const
Not equal operator.
Definition: fs_signature.h:2002
foxit::pdf::PagingSealSignature::e_PagingSealAPStateSigned
Signed signature.
Definition: fs_signature.h:2104
foxit::pdf::PagingSealConfig::is_display_multiple_seal
bool is_display_multiple_seal
Decide whether to display multiple paging seal appearance for current paging seal signature....
Definition: fs_signature.h:2075
IFX_Pause
Definition: fx_basic.h:3758
fs_image.h
Header file for image and bitmap related definitions and classes.
foxit::pdf::objects::PDFDictionary
Definition: fs_pdfobject.h:850
foxit::pdf::PagingSealConfig::Set
void Set(PagingSealPosition paging_seal_position, float offset, float first_page_percent, bool is_on_perforation, PagingSealStyle paging_seal_style, bool is_display_multiple_seal=false, int page_count_for_each_seal=30)
Set value.
foxit::pdf::TimeStampServer::e_SendResultFailToSendData
Fail to send data during sending request process.
Definition: fs_signature.h:1784
foxit::pdf::SignatureCallback::IsNeedPadData
virtual bool IsNeedPadData()=0
A callback function used to check whether to return all contents with padding zero or not,...
foxit::pdf::PagingSealConfig::is_on_perforation
bool is_on_perforation
Decide whether to chop a seal that covering the left or right margin of each two pages....
Definition: fs_signature.h:2062
foxit::pdf::TimeStampCallback::SendTimeStampRequest
virtual TimeStampServer::SendRequestResult SendTimeStampRequest(const String &request)=0
A callback function used to send time stamp request.
foxit::pdf::PagingSealSignature
Definition: fs_signature.h:2091
foxit::pdf::SignatureCallback::e_CertUnsupportType
Certificate is unsupport type.
Definition: fs_signature.h:1466
foxit::pdf::PagingSealSignature::SetAPStateBitmap
void SetAPStateBitmap(PagingSealAPState ap_state, const common::Bitmap &bitmap)
Set a bitmap for the appearance of signature state.
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::TimeStampServer::e_SendResultFailToRequest
Fail to request during sending request process.
Definition: fs_signature.h:1788
foxit::pdf::SignatureArray
Definition: fs_signature.h:37
foxit::pdf::PagingSealConfig
Definition: fs_signature.h:1902
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::pdf::PagingSealConfig::paging_seal_style
PagingSealStyle paging_seal_style
The style of paging seal signature. Please refer to values starting from PagingSealConfig::e_PagingSe...
Definition: fs_signature.h:2069
foxit::pdf::TimeStampCallback::Release
virtual void Release()=0
A callback function used to release current callback object itself.
foxit::pdf::PagingSealConfig::e_PagingSealPositionBottom
Bottom Paging Seal.
Definition: fs_signature.h:1917
foxit::common::Progressive::State
State
Enumeration for progress state.
Definition: fs_common.h:380
foxit::int32
FX_INT32 int32
32-bit signed integer.
Definition: fs_basictypes.h:193
foxit::pdf::PagingSealConfig::e_PagingSealPositionLeft
Left Paging Seal.
Definition: fs_signature.h:1911
foxit::common::Image
Definition: fs_image.h:459
foxit::pdf::TimeStampServerMgr::GetServerIndex
static int GetServerIndex(const TimeStampServer &server)
Get the index of a speicified time stamp server object.
foxit::pdf::Signature::DigestAlgorithm
DigestAlgorithm
Enumeration for signature digest algorithm.
Definition: fs_signature.h:235
foxit::WStringArray
Definition: fs_basictypes.h:227
foxit::pdf::PagingSealSignature::e_PagingSealAPStateInvalid
Verification state of a signature is invalid.
Definition: fs_signature.h:2108
foxit::pdf::TimeStampServer::e_SendResultOutOfMemory
Out of memory during sending request process.
Definition: fs_signature.h:1792
foxit::pdf::TimeStampServerMgr::GetServer
static TimeStampServer GetServer(int index)
Get time stamp server with specified index.
foxit::pdf::TimeStampServer::~TimeStampServer
~TimeStampServer()
Destructor.
foxit::pdf::TimeStampServer::e_SendResultSuccess
Send request successfully.
Definition: fs_signature.h:1778
foxit::pdf::SignatureCallback
Definition: fs_signature.h:1453
foxit::pdf::TimeStampServerMgr::GetDefaultServer
static TimeStampServer GetDefaultServer()
Get default time stamp server object.
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::pdf::TimeStampServerMgr
Definition: fs_signature.h:1663
foxit::pdf::SignatureCallback::GetDigest
virtual String GetDigest(const void *client_data)=0
A callback function used to get the digest after the calculation process is finished.
foxit::pdf::SignatureCallback::e_CertValid
Certificate is valid.
Definition: fs_signature.h:1462
foxit::pdf::PagingSealSignature::SetPagingSealConfig
void SetPagingSealConfig(PagingSealConfig paging_seal_config)
Set the config of paging seal signature.
foxit::pdf::SignatureCallback::e_CertNotSet
Certificate is not set to sign a signature.
Definition: fs_signature.h:1474
foxit::pdf::TimeStampServer::TimeStampServer
TimeStampServer(const TimeStampServer &other)
Constructor, with another time stamp server object.
foxit::pdf::PagingSealConfig::first_page_percent
float first_page_percent
The percent of the first paging seal. The rest percent will be divided equally by the other paging se...
Definition: fs_signature.h:2056
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::PagingSealConfig::e_PagingSealStyleMultipleSignatures
Add multiple signatures. Use the Signature to display the appearance of paging seal signature,...
Definition: fs_signature.h:1930