]> source.dussan.org Git - poi.git/commitdiff
Bug 58133 - Agile encryption - wrong checksum calculation
authorAndreas Beeker <kiwiwings@apache.org>
Mon, 13 Jul 2015 22:49:59 +0000 (22:49 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Mon, 13 Jul 2015 22:49:59 +0000 (22:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690837 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/crypt/ChunkedCipherOutputStream.java

index f663c7e089888347ceeb0c1c8cfb7f07c00fc883..2c5716d2a537da558880715e45ed1663d68ed269 100644 (file)
@@ -134,7 +134,7 @@ public abstract class ChunkedCipherOutputStream extends FilterOutputStream {
             super.close();\r
             \r
             int oleStreamSize = (int)(fileOut.length()+LittleEndianConsts.LONG_SIZE);\r
-            calculateChecksum(fileOut, oleStreamSize);\r
+            calculateChecksum(fileOut, (int)_pos);\r
             dir.createDocument(DEFAULT_POIFS_ENTRY, oleStreamSize, new EncryptedPackageWriter());\r
             createEncryptionInfoEntry(dir, fileOut);\r
         } catch (GeneralSecurityException e) {\r