Package org.apache.fop.pdf
Class PDFEncryptionJCE.RevBefore5Engine
- java.lang.Object
-
- org.apache.fop.pdf.PDFEncryptionJCE.InitializationEngine
-
- org.apache.fop.pdf.PDFEncryptionJCE.RevBefore5Engine
-
- Direct Known Subclasses:
PDFEncryptionJCE.Rev2Engine
,PDFEncryptionJCE.Rev3Engine
- Enclosing class:
- PDFEncryptionJCE
private abstract class PDFEncryptionJCE.RevBefore5Engine extends PDFEncryptionJCE.InitializationEngine
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
padding
Padding for passwords.-
Fields inherited from class org.apache.fop.pdf.PDFEncryptionJCE.InitializationEngine
encryptionLengthInBytes, oValue, permissions, preparedOwnerPassword, preparedUserPassword, uValue
-
-
Constructor Summary
Constructors Constructor Description RevBefore5Engine(PDFEncryptionJCE.EncryptionSettings encryptionSettings)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
computeOValue()
Applies Algorithm 3.3 Page 79 of the PDF 1.4 Reference.protected abstract byte[]
computeOValueStep3(byte[] hash)
protected abstract byte[]
computeOValueStep7(byte[] key, byte[] encryptionResult)
protected void
createEncryptionKey()
Applies Algorithm 3.2 Page 78 of the PDF 1.4 Reference.protected abstract byte[]
createEncryptionKeyStep6(byte[] hash)
protected byte[]
preparePassword(java.lang.String password)
Adds padding to the password as directed in page 78 of the PDF 1.4 Reference.(package private) void
run()
-
Methods inherited from class org.apache.fop.pdf.PDFEncryptionJCE.InitializationEngine
computeUValue, getEncryptionDictionaryPart
-
-
-
-
Constructor Detail
-
RevBefore5Engine
RevBefore5Engine(PDFEncryptionJCE.EncryptionSettings encryptionSettings)
-
-
Method Detail
-
computeOValue
protected void computeOValue()
Applies Algorithm 3.3 Page 79 of the PDF 1.4 Reference.- Specified by:
computeOValue
in classPDFEncryptionJCE.InitializationEngine
-
createEncryptionKey
protected void createEncryptionKey()
Applies Algorithm 3.2 Page 78 of the PDF 1.4 Reference.- Specified by:
createEncryptionKey
in classPDFEncryptionJCE.InitializationEngine
-
preparePassword
protected byte[] preparePassword(java.lang.String password)
Adds padding to the password as directed in page 78 of the PDF 1.4 Reference.- Specified by:
preparePassword
in classPDFEncryptionJCE.InitializationEngine
- Parameters:
password
- the password- Returns:
- the password with additional padding if necessary
-
run
void run()
- Overrides:
run
in classPDFEncryptionJCE.InitializationEngine
-
computeOValueStep3
protected abstract byte[] computeOValueStep3(byte[] hash)
-
computeOValueStep7
protected abstract byte[] computeOValueStep7(byte[] key, byte[] encryptionResult)
-
createEncryptionKeyStep6
protected abstract byte[] createEncryptionKeyStep6(byte[] hash)
-
-