Class EncryptionContext

java.lang.Object
org.sejda.sambox.encryption.EncryptionContext

public final class EncryptionContext extends Object
Context holding the current state of the encryption
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • security

      public final StandardSecurity security
    • documentId

      private byte[] documentId
    • key

      private byte[] key
  • Constructor Details

  • Method Details

    • documentId

      public void documentId(byte[] documentId)
      Sets the document ID to use in those algorithms requiring it.
      Parameters:
      documentId -
    • documentId

      byte[] documentId()
    • key

      void key(byte[] key)
      Sets the encryption key
      Parameters:
      key -
    • key

      byte[] key()
    • encryptionAlgorithm

      public GeneralEncryptionAlgorithm encryptionAlgorithm()
    • encryptionAlgorithmFromEncryptionDictionary

      public static GeneralEncryptionAlgorithm encryptionAlgorithmFromEncryptionDictionary(COSDictionary enc, byte[] encryptionKey)
      Parameters:
      enc -
      Returns:
      a GeneralEncryptionAlgorithm generated using the given encryption algorithm or null if unable to generate.