ImageGear for C and C++ on Windows v19.4 - Updated
AT_PDF_SECURITYDATA
API Reference Guide > PDF Component API Reference > PDF Component Structures Reference > AT_PDF_SECURITYDATA

This structure describes the data for the standard security handler.

Declaration:

 
Copy Code
typedef struct tagAT_PDF_SECURITYDATA
{
        AT_UINT size;
        AT_PDF_BOOL newUserPW;
        AT_PDF_BOOL hasUserPW;
        CHAR userPW[256];
        AT_PDF_BOOL newOwnerPW;
        AT_PDF_BOOL hasOwnerPW;
        CHAR ownerPW[256];
        AT_DWORD perms;
        LONG keyLength;
        AT_INT32 revision;
        AT_PDF_BOOL encryptMetadata;
        LONG encryptMethod;
        AT_PDF_BOOL encryptAttachmentsOnly;
        AT_INT32 version;
} AT_PDF_SECURITYDATA;
typedef AT_PDF_SECURITYDATA FAR* LPAT_PDF_SECURITYDATA;

Members:

Name Type Description
size AT_UINT Size of this structure.
newUserPW AT_PDF_BOOL TRUE if the user password should be changed.
hasUserPW AT_PDF_BOOL TRUE if there is a user password.
userPW CHAR[256] The user password string.
newOwnerPW AT_PDF_BOOL TRUE if the owner password should be changed; FALSE otherwise.
hasOwnerPW AT_PDF_BOOL TRUE if an owner password is provided; FALSE otherwise.
ownerPW CHAR[256] The owner password string.
perms AT_DWORD Permissions to allow. An OR of the enumIGPDFPermsFlags values.
keyLength LONG Encryption key length in byte.
revision AT_INT32 Indicates /R value.
encryptMetadata AT_PDF_BOOL Flag that indicates whether document metadata will be encrypted.
encryptMethod LONG Method of encryption for filters to use. One of the enumIGPDFStdSecurityMethod values.
encryptAttachmentsOnly AT_PDF_BOOL Flag to indicate that only Attachments are encrypted - encryptMetadata and encryptAttachmentsOnly cannot both be true.
version AT_INT32 Indicates a /V value.

Remarks:

The password strings in PDF are padded or truncated to exactly 32 bytes. If the password string is more than 32 bytes long, used only its first 32 bytes; if it is less than 32 bytes long, it padded by appending the required number of additional bytes from the beginning of the following padding string: <28 BF 4E 5E 4E 75 8A 41 64 00 4E 56 FF FA 01 08 2E 2E 00 B6 D0 68 3E 80 2F 0C A9 FE 64 53 69 7A >