Class PdfEncryption

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

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

    • STANDARD_ENCRYPTION_40

      public static final int STANDARD_ENCRYPTION_40
      Deprecated.
      See Also:
    • STANDARD_ENCRYPTION_128

      public static final int STANDARD_ENCRYPTION_128
      Deprecated.
      See Also:
    • AES_128

      public static final int AES_128
      Deprecated.
      See Also:
    • AES_256_V3

      public static final int AES_256_V3
      Deprecated.
      See Also:
    • publicKeyHandler

      protected PdfPublicKeySecurityHandler publicKeyHandler
      Deprecated.
      The public key security handler for certificate encryption
  • Constructor Details

    • PdfEncryption

      public PdfEncryption()
      Deprecated.
    • PdfEncryption

      public PdfEncryption(PdfEncryption enc)
      Deprecated.
  • Method Details

    • createDocumentId

      public static byte[] createDocumentId()
      Deprecated.
    • createInfoId

      public static PdfObject createInfoId(byte[] id)
      Deprecated.
    • createInfoId

      public static PdfObject createInfoId(byte[] idPartOne, byte[] idPartTwo)
      Deprecated.
    • getFileIdChangingPart

      public static byte[] getFileIdChangingPart(PdfObject fileId)
      Deprecated.
      This method returns a changing part of the fileId when can be identified. Returns a complete fileId of the changing part is not found.
      Parameters:
      fileId - PdfObject
      Returns:
      byte array representing the changing part of the document identifier
    • setCryptoMode

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

      public int getCryptoMode()
      Deprecated.
    • isMetadataEncrypted

      public boolean isMetadataEncrypted()
      Deprecated.
    • isEmbeddedFilesOnly

      public boolean isEmbeddedFilesOnly()
      Deprecated.
      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)
      Deprecated.
    • setupByUserPassword

      public void setupByUserPassword(byte[] documentID, byte[] userPassword, byte[] ownerKey, int permissions)
      Deprecated.
      Parameters:
      documentID - byte array of document id
      userPassword - byte array of user password
      ownerKey - byte array of owner key
      permissions - permissions
    • setupByOwnerPassword

      public void setupByOwnerPassword(byte[] documentID, byte[] ownerPassword, byte[] userKey, byte[] ownerKey, int permissions)
      Deprecated.
      Parameters:
      documentID - byte array of document id
      ownerPassword - byte array of owner password
      userKey - byte array of user key
      ownerKey - byte array of owner key
      permissions - permissions
    • setupByEncryptionKey

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

      public void setHashKey(int number, int generation)
      Deprecated.
    • getEncryptionDictionary

      public PdfDictionary getEncryptionDictionary()
      Deprecated.
    • getFileID

      public PdfObject getFileID()
      Deprecated.
    • getEncryptionStream

      public OutputStreamEncryption getEncryptionStream(OutputStream os)
      Deprecated.
    • calculateStreamSize

      public int calculateStreamSize(int n)
      Deprecated.
    • encryptByteArray

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

      public StandardDecryption getDecryptor()
      Deprecated.
    • decryptByteArray

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

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

      public byte[] computeUserPassword(byte[] ownerPassword)
      Deprecated.
    • setupByOwnerPassword

      public void setupByOwnerPassword(byte[] documentID, byte[] ownerPassword, byte[] uValue, byte[] ueValue, byte[] oValue, byte[] oeValue, int permissions) throws GeneralSecurityException
      Deprecated.
      implements step d of Algorithm 2.A: Retrieving the file encryption key from an encrypted document in order to decrypt it (revision 6 and later) - ISO 32000-2 section 7.6.4.3.3
      Throws:
      GeneralSecurityException
    • setupByUserPassword

      public void setupByUserPassword(byte[] documentID, byte[] userPassword, byte[] uValue, byte[] ueValue, byte[] oValue, byte[] oeValue, int permissions) throws GeneralSecurityException
      Deprecated.
      implements step e of Algorithm 2.A: Retrieving the file encryption key from an encrypted document in order to decrypt it (revision 6 and later) - ISO 32000-2 section 7.6.4.3.3
      Throws:
      GeneralSecurityException
    • decryptAndCheckPerms

      public boolean decryptAndCheckPerms(byte[] permsValue) throws GeneralSecurityException
      Deprecated.
      implements step f of Algorithm 2.A: Retrieving the file encryption key from an encrypted document in order to decrypt it (revision 6 and later) - ISO 32000-2 section 7.6.4.3.3
      Throws:
      GeneralSecurityException