Class PDFEncryptor
java.lang.Object
com.inductiveautomation.rm.pdf.reader.PDFSecurityHandler
com.inductiveautomation.rm.pdf.writer.PDFEncryptor
The PDFEncyptor is a subclass of PDFSecurityHandler that is used
to encrypt strings and streams for pdf output.
-
Field Summary
Fields inherited from class com.inductiveautomation.rm.pdf.reader.PDFSecurityHandler
ACCESSABILITY_EXTRACTS_ALLOWED, ADD_ANNOTATIONS_ALLOWED, ASSEMBLE_DOCUMENT_ALLOWED, EXTRACT_TEXT_AND_IMAGES_ALLOWED, FILL_IN_FORMS_ALLOWED, MAXIMUM_RESOLUTION_PRINTING_ALLOWED, MODIFICATIONS_ALLOWED, PRINTING_ALLOWED
-
Constructor Summary
ConstructorsConstructorDescriptionPDFEncryptor
(byte[] fileID, String ownerP, String userP, int permissionFlags) Creates a new new PDF encryptor. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
encryptBytes
(byte[] aBuffer) Returns a new copy of the input buffer, encrypted.byte[]
Returns the contents of the pdf string, encryptedReturns the encryption dictionary.void
startEncrypt
(int oNum, int gNum) Encryption of strings and streams use the object number and generation number as part of the encryption algorithm.Methods inherited from class com.inductiveautomation.rm.pdf.reader.PDFSecurityHandler
arcfour_decrypt, decryptDeep, decryptObject, getBytesForEncryptionEntry, getEncryptionKey, getEncryptionKey, getInstance, getOwnerPasswordEntry, getOwnerPasswordEntryBytes, getPDFStringForBytes, getUserPasswordEntry, getUserPasswordEntryBytes, init, main, setEncryptionParameters, startDecrypt
-
Constructor Details
-
PDFEncryptor
Creates a new new PDF encryptor. Both the owner and user passwords are optional.
-
-
Method Details
-
getEncryptionDict
Returns the encryption dictionary. -
startEncrypt
public void startEncrypt(int oNum, int gNum) Encryption of strings and streams use the object number and generation number as part of the encryption algorithm. For strings inside other objects, the object & generation number used are the ones for the enclosing object. When an object from the xref table is output, it calls startEncrypt() to save away these numbers so all objects inside the xref object will use the right values. Encrypt-decrypt is symmetric, so call superclass decrypt to create the encryption key -
encryptString
Returns the contents of the pdf string, encrypted -
encryptBytes
public byte[] encryptBytes(byte[] aBuffer) Returns a new copy of the input buffer, encrypted.
-