You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2023/07/27 06:20:39 UTC

svn commit: r1911310 - /pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java

Author: tilman
Date: Thu Jul 27 06:20:39 2023
New Revision: 1911310

URL: http://svn.apache.org/viewvc?rev=1911310&view=rev
Log:
PDFBOX-5639: add test

Modified:
    pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java

Modified: pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java?rev=1911310&r1=1911309&r2=1911310&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java Thu Jul 27 06:20:39 2023
@@ -305,6 +305,19 @@ public class TestSymmetricKeyEncryption
         doc.close();
     }
 
+    /**
+     * test AESV3 with R=5 and excess bytes.
+     * 
+     * @throws IOException 
+     */
+    public void testPDFBox5639() throws IOException
+    {
+        File file = new File("target/pdfs", "PDFBOX-5639.pdf");
+        PDDocument document = PDDocument.load(file, "JUL2023rfi");
+        assertEquals(2, document.getNumberOfPages());
+        document.close();
+    }
+
     private void testSymmEncrForKeySize(int keyLength, boolean preferAES,
             int sizePriorToEncr, byte[] inputFileAsByteArray,
             String userpassword, String ownerpassword,