java.lang.Object
org.sejda.sambox.encryption.Algorithm1
- All Implemented Interfaces:
COSVisitor,GeneralEncryptionAlgorithm
Algorithm 1 defined in Chapter 7.6.2 (General Encryption Algorithm) PDF 32100-1:2008
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]private COSObjectKeyprivate final MessageDigestprivate final EncryptionAlgorithmEngineprivate final Function<COSObjectKey,byte[]> private Function<byte[],byte[]> private final Function<byte[],byte[]> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidsetCurrentCOSObjectKey(COSObjectKey currentCOSObjectKey) Sets the current object and generation numberstoString()voidvoid(package private) static Algorithm1withAESEngine(byte[] key) Factory method for anAlgorithm1with anAESEngine(package private) static Algorithm1withARC4Engine(byte[] key) Factory method for anAlgorithm1with anARC4Engine
-
Field Details
-
AES_SALT
private static final byte[] AES_SALT -
engine
-
digest
-
keyCalculator
-
md5Initializer
-
md5ToKey
-
currentCOSObjectKey
-
-
Constructor Details
-
Algorithm1
-
-
Method Details
-
setCurrentCOSObjectKey
Description copied from interface:GeneralEncryptionAlgorithmSets the current object and generation numbers- Specified by:
setCurrentCOSObjectKeyin interfaceGeneralEncryptionAlgorithm
-
visit
- Specified by:
visitin interfaceCOSVisitor
-
visit
- Specified by:
visitin interfaceCOSVisitor
-
requireObjectKey
private void requireObjectKey() -
toString
-
withAESEngine
Factory method for anAlgorithm1with anAESEngine- Parameters:
key-- Returns:
-
withARC4Engine
Factory method for anAlgorithm1with anARC4Engine- Parameters:
key-- Returns:
-