Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Patching my way through ODFTOOLKIT-401 and ODFTOOLKIT-402, I now get one of these errors when it come to decrypting the file:
Aug 02, 2015 10:51:12 AM org.odftoolkit.odfdom.pkg.OdfPackage decryptData
SEVERE: null
java.security.InvalidAlgorithmParameterException: Wrong IV length: must be 8 bytes long
at com.sun.crypto.provider.CipherCore.init(CipherCore.java:430)
at com.sun.crypto.provider.BlowfishCipher.engineInit(BlowfishCipher.java:222)
at javax.crypto.Cipher.implInit(Cipher.java:796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:854)
at javax.crypto.Cipher.init(Cipher.java:1374)
at javax.crypto.Cipher.init(Cipher.java:1308)
at org.odftoolkit.odfdom.pkg.OdfPackage.decryptData(OdfPackage.java:1897)
at org.odftoolkit.odfdom.pkg.OdfPackage.getBytes(OdfPackage.java:1729)
at org.odftoolkit.odfdom.pkg.OdfPackage.getInputStream(OdfPackage.java:2018)
at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(OdfFileDom.java:210)
at org.odftoolkit.odfdom.dom.OdfContentDom.initialize(OdfContentDom.java:60)
at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(OdfFileDom.java:105)
at org.odftoolkit.odfdom.dom.OdfContentDom.<init>(OdfContentDom.java:50)
at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(OdfFileDom.java:157)
at org.odftoolkit.odfdom.pkg.OdfPackageDocument.getFileDom(OdfPackageDocument.java:323)
at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getFileDom(OdfSchemaDocument.java:405)
at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getContentDom(OdfSchemaDocument.java:206)
at org.odftoolkit.simple.Document.getContentRoot(Document.java:870)
at org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:327)
at org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:114)
at local.Main.main(Main.java:22)Exception in thread "main" java.lang.NullPointerException
at org.odftoolkit.simple.Document.getContentRoot(Document.java:872)
at org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:327)
at org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:114)
at local.Main.main(Main.java:22)
or this one (when the password is wrong):
Aug 02, 2015 10:56:21 AM org.odftoolkit.odfdom.pkg.OdfPackage decryptData
SEVERE: null
org.odftoolkit.odfdom.pkg.OdfDecryptedException: The given password is wrong, please check it.
at org.odftoolkit.odfdom.pkg.OdfPackage.decryptData(OdfPackage.java:1914)
at org.odftoolkit.odfdom.pkg.OdfPackage.getBytes(OdfPackage.java:1729)
at org.odftoolkit.odfdom.pkg.OdfPackage.getInputStream(OdfPackage.java:2018)
at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(OdfFileDom.java:210)
at org.odftoolkit.odfdom.dom.OdfContentDom.initialize(OdfContentDom.java:60)
at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(OdfFileDom.java:105)
at org.odftoolkit.odfdom.dom.OdfContentDom.<init>(OdfContentDom.java:50)
at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(OdfFileDom.java:157)
at org.odftoolkit.odfdom.pkg.OdfPackageDocument.getFileDom(OdfPackageDocument.java:323)
at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getFileDom(OdfSchemaDocument.java:405)
at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getContentDom(OdfSchemaDocument.java:206)
at org.odftoolkit.simple.Document.getContentRoot(Document.java:870)
at org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:327)
at org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:114)
at local.Main.main(Main.java:22)Exception in thread "main" java.lang.NullPointerException
at org.odftoolkit.simple.Document.getContentRoot(Document.java:872)
at org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:327)
at org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:114)
at local.Main.main(Main.java:22)
Note how both actually come through as NullPointerException, while the original exception is logged earlier.