summaryrefslogtreecommitdiff
path: root/package/inc/PackageConstants.hxx
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2011-03-23 14:13:24 +0100
committerMikhail Voytenko <mav@openoffice.org>2011-03-23 14:13:24 +0100
commit1decd7beffc8333d441b4327649685464e129d26 (patch)
treeb5ea5538ef1984c510bf2d4c51fdaa2d319d9e6f /package/inc/PackageConstants.hxx
parentb92dc6c03d0876230e3e7f2daa43a3350972f0e9 (diff)
mav60: #164341# fix problems with the new implementation
Diffstat (limited to 'package/inc/PackageConstants.hxx')
-rw-r--r--package/inc/PackageConstants.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/inc/PackageConstants.hxx b/package/inc/PackageConstants.hxx
index 3695f023ec58..90c73edf2ba7 100644
--- a/package/inc/PackageConstants.hxx
+++ b/package/inc/PackageConstants.hxx
@@ -31,7 +31,12 @@
const sal_Int32 n_ConstBufferSize = 32768;
const sal_Int32 n_ConstMaxMemoryStreamSize = 20480;
+
+// by calculation of the digest we read 32 bytes more ( if available )
+// it allows to ignore the padding if the stream is longer than n_ConstDigestDecrypt since we read at least two blocks more;
+// if the stream is shorter or equal the padding will be done successfully
const sal_Int32 n_ConstDigestLength = 1024;
+const sal_Int32 n_ConstDigestDecrypt = 1056; // 1024 + 32
// the constants related to the manifest.xml entries
#define PKG_MNFST_MEDIATYPE 0
@@ -49,7 +54,7 @@ const sal_Int32 n_ConstDigestLength = 1024;
#define PKG_MNFST_DERKEYSIZE 11
#define PKG_SIZE_NOENCR_MNFST 3
-#define PKG_SIZE_ENCR_MNFST 8
+#define PKG_SIZE_ENCR_MNFST 12
// the properties related constants
#define ENCRYPTION_KEY_PROPERTY "EncryptionKey"