[ https://issues.apache.org/jira/browse/PDFBOX-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872174#comment-17872174 ]
Tilman Hausherr commented on PDFBOX-5866: ----------------------------------------- Exception in thread "main" java.io.IOException: java.security.InvalidKeyException: Invalid AES key length: 48 bytes at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.validatePerms(StandardSecurityHandler.java:355) at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareForDecryption(StandardSecurityHandler.java:296) at org.apache.pdfbox.pdfparser.COSParser.prepareDecryption(COSParser.java:1214) at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:287) at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:107) at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:171) at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:136) at org.apache.pdfbox.Loader.loadPDF(Loader.java:466) at org.apache.pdfbox.Loader.loadPDF(Loader.java:348) at org.apache.pdfbox.Loader.loadPDF(Loader.java:282) at NewClass.main(NewClass.java:31) Caused by: java.security.InvalidKeyException: Invalid AES key length: 48 bytes at java.base/com.sun.crypto.provider.AESCrypt.init(AESCrypt.java:90) at java.base/com.sun.crypto.provider.ElectronicCodeBook.init(ElectronicCodeBook.java:97) at java.base/com.sun.crypto.provider.CipherCore.init(CipherCore.java:591) at java.base/com.sun.crypto.provider.CipherCore.init(CipherCore.java:467) at java.base/com.sun.crypto.provider.AESCipher.engineInit(AESCipher.java:313) at java.base/javax.crypto.Cipher.implInit(Cipher.java:837) at java.base/javax.crypto.Cipher.chooseProvider(Cipher.java:899) at java.base/javax.crypto.Cipher.init(Cipher.java:1284) at java.base/javax.crypto.Cipher.init(Cipher.java:1221) at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.validatePerms(StandardSecurityHandler.java:327) > Unable to load password protected pdf > -------------------------------------- > > Key: PDFBOX-5866 > URL: https://issues.apache.org/jira/browse/PDFBOX-5866 > Project: PDFBox > Issue Type: Bug > Reporter: Charles D > Priority: Major > Attachments: pdfbox_invalid_pwd.pdf > > > PDFBox is unable to load password protected pdf. Error is "Invalid AES key > length: 48 bytes." > Adobe and qpdf are able to successfully open it , but many other applications > I've tried are unable to do so. > The pdf is created by a third party scanner so unfortunately we have no > insight/control over its creation. > [^pdfbox_invalid_pwd.pdf] . Please let me know the best way to provide the > password. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org