Package com.reportmill.pdf
Class PDFEncryptor
- java.lang.Object
- 
- com.ribs.pdf.PDFSecurityHandler
- 
- com.reportmill.pdf.PDFEncryptor
 
 
- 
 public class PDFEncryptor extends PDFSecurityHandler 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.ribs.pdf.PDFSecurityHandlerACCESSABILITY_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 SummaryConstructors Constructor Description PDFEncryptor(byte[] fileID, java.lang.String ownerP, java.lang.String userP, int permissionFlags)Creates a new new PDF encryptor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]encryptBytes(byte[] aBuffer)Returns a new copy of the input buffer, encrypted.byte[]encryptString(java.lang.String s)Returns the contents of the pdf string, encryptedjava.util.MapgetEncryptionDict()Returns the encryption dictionary.voidstartEncrypt(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.ribs.pdf.PDFSecurityHandlerarcfour_decrypt, authenticateUserPassword, decryptDeep, decryptObject, generateEncryptionKey, getBytesForEncryptionEntry, getEncryptionEntryStringForBytes, getEncryptionKey, getHandler, getInstance, getOwnerPasswordEntry, getOwnerPasswordEntryBytes, getUserPasswordEntry, getUserPasswordEntryBytes, init, main, pad, registerHandler, setEncryptionParameters, startDecrypt
 
- 
 
- 
- 
- 
Method Detail- 
getEncryptionDictpublic java.util.Map getEncryptionDict() Returns the encryption dictionary.
 - 
startEncryptpublic 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.
 - 
encryptStringpublic byte[] encryptString(java.lang.String s) Returns the contents of the pdf string, encrypted
 - 
encryptBytespublic byte[] encryptBytes(byte[] aBuffer) Returns a new copy of the input buffer, encrypted.
 
- 
 
-