Class PdfEncryption

java.lang.Object
com.lowagie.text.pdf.PdfEncryption

public class PdfEncryption extends Object
Author:
Paulo Soares (psoares@consiste.pt), Kazuya Ujihara
  • Field Details

  • Constructor Details

    • PdfEncryption

      public PdfEncryption()
    • PdfEncryption

      public PdfEncryption(PdfEncryption enc)
  • Method Details

    • setCryptoMode

      public void setCryptoMode(int mode, int kl)
    • getCryptoMode

      public int getCryptoMode()
    • isMetadataEncrypted

      public boolean isMetadataEncrypted()
    • isEmbeddedFilesOnly

      public boolean isEmbeddedFilesOnly()
      Indicates if only the embedded files have to be encrypted.
      Returns:
      if true only the embedded files will be encrypted
      Since:
      2.1.3
    • setupAllKeys

      public void setupAllKeys(byte[] userPassword, byte[] ownerPassword, int permissions)
    • createDocumentId

      public static byte[] createDocumentId()
    • setupByUserPassword

      public void setupByUserPassword(byte[] documentID, byte[] userPassword, byte[] ownerKey, int permissions)
    • setupByOwnerPassword

      public void setupByOwnerPassword(byte[] documentID, byte[] ownerPassword, byte[] userKey, byte[] ownerKey, int permissions)
    • setupByEncryptionKey

      public void setupByEncryptionKey(byte[] key, int keylength)
    • setHashKey

      public void setHashKey(int number, int generation)
    • createInfoId

      public static PdfObject createInfoId(byte[] id)
    • getEncryptionDictionary

      public PdfDictionary getEncryptionDictionary()
    • getFileID

      public PdfObject getFileID()
    • getEncryptionStream

      public OutputStreamEncryption getEncryptionStream(OutputStream os)
    • calculateStreamSize

      public int calculateStreamSize(int n)
    • encryptByteArray

      public byte[] encryptByteArray(byte[] b)
    • getDecryptor

      public StandardDecryption getDecryptor()
    • decryptByteArray

      public byte[] decryptByteArray(byte[] b)
    • addRecipient

      public void addRecipient(Certificate cert, int permission)
    • computeUserPassword

      public byte[] computeUserPassword(byte[] ownerPassword)