Comprehensive Guide for Developers: Features, Integration, and API Reference
Security API. More...
#include <pdfsdk/core/document.h>
Go to the source code of this file.
Classes | |
struct | PDSecurityHandler |
struct | PDStdSecurityParams |
Typedefs | |
typedef enum PDPermReqObj | PDPermReqObj |
typedef enum PDPermReqOp | PDPermReqOp |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptNewAuthDataProc) (void *clientData, void **pAuthData) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptFreeAuthDataProc) (void *authData) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptNewSecurityDataProc) (void *clientData, PDObject encryptDict, void **pSecurityData) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptCopySecurityDataProc) (void *securityData, void **pSecurityData) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptFreeSecurityDataProc) (void *securityData) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptGetKeyDataProc) (void *securityData, PDAtom cryptFilter, PDObject decodeParms, void *buffer, size_t bufsize, size_t *pSize, PDAtom *pMethod) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptEncryptProc) (void *securityData, const void *input, size_t inputSize, void *output, size_t outputSize, uint32_t objnum, uint16_t generation, PDAtom cryptFilter, PDObject decodeParms, size_t *pOutputSize) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptAuthorizeProc) (void *securityData, PDPermReqObj object, PDPermReqOp operation, const void *authData, bool *pGranted) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptFillEncryptDictProc) (void *securityData, PDDoc doc, PDObject encryptDict) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptEncryptMetadataProc) (void *securityData, bool *pEncrypt) |
typedef PDErrCode(PDFSDK_CALLCONV * | PDCryptFreeClientDataProc) (void *clientData) |
typedef struct PDSecurityHandler | PDSecurityHandler |
typedef void * | PDStdSecurityData |
typedef uint32_t | PDStdPerms |
typedef wchar_t | PDStdPassword[kPDStdPasswordMaxChars+1] |
typedef uint32_t | PDStdSecurityModifyFlags |
Functions | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocSetNewSecurityHandler (PDDoc doc, PDAtom name, void *securityData) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocGetSecurityHandlerData (PDDoc doc, void **pSecurityData) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocGetSecurityHandlerName (PDDoc doc, PDAtom *pName) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocGetNewSecurityHandlerData (PDDoc doc, void **pSecurityData) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocGetNewSecurityHandlerName (PDDoc doc, PDAtom *pFilter) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocEncryptionIsModified (PDDoc doc, bool *pValue) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocPermRequest (PDDoc doc, PDPermReqObj permReqObj, PDPermReqOp permReqOp, const void *authData, bool *pGranted) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocPermRequestSecurity (PDDoc doc, PDPermReqObj permReqObj, PDPermReqOp permReqOp, const void *authData, bool *pGranted) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDDocPermRequestWithAuth (PDDoc doc, PDPermReqObj permReqObj, PDPermReqOp permReqOp, bool *pGranted) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDSecurityRegisterHandler (PDAtom filter, const PDSecurityHandler *handler, void *clientData) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDSecurityNewAuthData (PDAtom filter, void **pAuthData) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDSecurityFreeAuthData (PDAtom filter, void *authData) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDStdSecurityDataNew (PDDoc doc, PDStdSecurityData *pSecurityData) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDStdSecurityDataUpdateParams (PDStdSecurityData securityData, PDStdSecurityModifyFlags modifyFlags, const PDStdSecurityParams *params) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDStdSecurityDataGetParams (PDStdSecurityData securityData, PDStdSecurityParams *pParams) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDStdSecurityDataFree (PDStdSecurityData securityData) |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDStdPasswordSetChars (PDStdPassword *authData, const wchar_t *chars) |
Security API.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocGetNewSecurityHandlerData | ( | PDDoc | doc, |
void ** | pSecurityData ) |
Gets the security data structure for the specified document's new security handler. Use PDDocGetSecurityData() to get the security data structure for the document's current security handler. The new security handler is used to encrypt the document during a save. Handler's copySecurityData
is used to create the returned pointer
doc | The document whose new security data structure is obtained. |
securityHandlerData | A pointer to the security data structure. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocGetNewSecurityHandlerName | ( | PDDoc | doc, |
PDAtom * | pFilter ) |
Gets the name of the new security handler.
"Standard" is the name of the default password protection handler
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocGetSecurityHandlerData | ( | PDDoc | doc, |
void ** | pSecurityData ) |
Gets the security data structure for the specified document's current security handler. Use PDDocGetNewSecurityData() to get the security data structure for the document's new security handler. The current security handler is the security handler that is used to decrypt the current document and encrypt the document during a save if a new security handler is not set. Handler's copySecurityData
is used to create the returned pointer
doc | The document whose new security data structure is obtained. |
securityHandlerData | A pointer to the security data structure. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocGetSecurityHandlerName | ( | PDDoc | doc, |
PDAtom * | pName ) |
Gets the name of the current security handler.
"Standard" is the name of the default password protection handler
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocSetNewSecurityHandler | ( | PDDoc | doc, |
PDAtom | name, | ||
void * | securityData ) |
Sets the specified document's new security handler. The new security handler is used to encrypt the document during a save.
doc | The document whose new security handler is set. |
name | The PDAtom for the name of the new security handler to use for the document. This name must be the same as the pdfName used when the security handler was registered using PDRegisterSecurityHandler(). |
securityData | The new security data structure to set for doc . If the call succeeds, doc will take ownership of securityData and will free it later using PDSecurityHandler::freeSecurityData |