java.lang.Object
org.sejda.sambox.encryption.EncryptionContext
Context holding the current state of the encryption
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private byte[]private static final org.slf4j.Loggerfinal StandardSecurity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) byte[]voiddocumentId(byte[] documentId) Sets the document ID to use in those algorithms requiring it.static GeneralEncryptionAlgorithmencryptionAlgorithmFromEncryptionDictionary(COSDictionary enc, byte[] encryptionKey) (package private) byte[]key()(package private) voidkey(byte[] key) Sets the encryption key
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
security
-
documentId
private byte[] documentId -
key
private byte[] key
-
-
Constructor Details
-
EncryptionContext
-
-
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
-
encryptionAlgorithmFromEncryptionDictionary
public static GeneralEncryptionAlgorithm encryptionAlgorithmFromEncryptionDictionary(COSDictionary enc, byte[] encryptionKey) - Parameters:
enc-- Returns:
- a
GeneralEncryptionAlgorithmgenerated using the given encryption algorithm or null if unable to generate.
-