[
https://issues.apache.org/jira/browse/PDFBOX-2456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralf Hauser updated PDFBOX-2456:
--------------------------------
Attachment: TestSymmetricKeyEncryption.java
Please find a first go at TestSymmetricKeyEncryption.java
Remarks:
1) static final String HOME_WORKSPACE must be solved differently
2) testProtectionInnerAttachment() has a good verification with the embedded
file - albeit the inner file with 256 doesn't open with my acrobat XI (but this
might be a problem with the AES256 encryption code)
3) testProtection() looks good if I dump the decrypted files. But I haven't
found a good way to determine whether the original plain and the decrypted are
sufficently equal to assertTrue() as the size do change
> create TestSymmetricKeyEncryption.java
> --------------------------------------
>
> Key: PDFBOX-2456
> URL: https://issues.apache.org/jira/browse/PDFBOX-2456
> Project: PDFBox
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 2.0.0
> Environment: java7 debian7
> Reporter: Ralf Hauser
> Fix For: 2.0.0
>
> Attachments: TestSymmetricKeyEncryption.java,
> enc128bit_20141025_115145.pdf, enc256bit_20141025_105451.pdf,
> preEnc_20141025_105451.pdf, preEnc_20141025_115145.pdf
>
>
> similarly to org.apache.pdfbox.encryption.TestPublicKeyEncryption, also test
> password based encryption
> 1) 128bit
> 2) 256bit AES PDFBOX-1594
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)