summaryrefslogtreecommitdiff
path: root/package/inc
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2011-03-24 13:44:49 +0100
committerMikhail Voytenko <mav@openoffice.org>2011-03-24 13:44:49 +0100
commit481a55dc3bbf3c97c828fa727f4c30f0d8ab171e (patch)
treea29bf2cc93a7ed15d2903dae903703f4fee6beac /package/inc
parent0cdc1272fdfbf181b6f297185e0a02dddb912a1a (diff)
mav60: #164341# fix problems with the new implementation
Diffstat (limited to 'package/inc')
-rw-r--r--package/inc/EncryptedDataHeader.hxx33
-rw-r--r--package/inc/EncryptionData.hxx5
-rw-r--r--package/inc/ZipFile.hxx1
-rw-r--r--package/inc/ZipPackage.hxx2
-rw-r--r--package/inc/ZipPackageStream.hxx2
5 files changed, 24 insertions, 19 deletions
diff --git a/package/inc/EncryptedDataHeader.hxx b/package/inc/EncryptedDataHeader.hxx
index 70d83ea300d7..be2c7643ec51 100644
--- a/package/inc/EncryptedDataHeader.hxx
+++ b/package/inc/EncryptedDataHeader.hxx
@@ -31,24 +31,25 @@
/* The structure of this header is as follows:
- Header signature 4 bytes
- Version number 2 bytes
- Iteraction count 4 bytes
- Size 4 bytes
- EncAlgorithm 4 bytes
- DigestAlgorithm 4 bytes
- DerivedKeySize 4 bytes
- Salt length 2 bytes
- IV length 2 bytes
- Digest length 2 bytes
- MediaType length 2 bytes
- Salt content X bytes
- IV content X bytes
- digest content X bytes
- MediaType X bytes
+ Header signature 4 bytes
+ Version number 2 bytes
+ Iteraction count 4 bytes
+ Size 4 bytes
+ EncAlgorithm 4 bytes
+ DigestAlgorithm 4 bytes
+ DerivedKeySize 4 bytes
+ StartKeyAlgorithm 4 bytes
+ Salt length 2 bytes
+ IV length 2 bytes
+ Digest length 2 bytes
+ MediaType length 2 bytes
+ Salt content X bytes
+ IV content X bytes
+ digest content X bytes
+ MediaType X bytes
*/
const sal_uInt32 n_ConstHeader = 0x05024d4dL; // "MM\002\005"
-const sal_Int32 n_ConstHeaderSize = 34; // + salt length + iv length + digest length + mediatype length
+const sal_Int32 n_ConstHeaderSize = 38; // + salt length + iv length + digest length + mediatype length
const sal_Int16 n_ConstCurrentVersion = 1;
#endif
diff --git a/package/inc/EncryptionData.hxx b/package/inc/EncryptionData.hxx
index a3df8b550768..549669b3feb1 100644
--- a/package/inc/EncryptionData.hxx
+++ b/package/inc/EncryptionData.hxx
@@ -56,13 +56,15 @@ public:
sal_Int32 m_nEncAlg;
sal_Int32 m_nCheckAlg;
sal_Int32 m_nDerivedKeySize;
+ sal_Int32 m_nStartKeyGenID;
- EncryptionData( const BaseEncryptionData& aData, const ::com::sun::star::uno::Sequence< sal_Int8 >& aKey, sal_Int32 nEncAlg, sal_Int32 nCheckAlg, sal_Int32 nDerivedKeySize )
+ EncryptionData( const BaseEncryptionData& aData, const ::com::sun::star::uno::Sequence< sal_Int8 >& aKey, sal_Int32 nEncAlg, sal_Int32 nCheckAlg, sal_Int32 nDerivedKeySize, sal_Int32 nStartKeyGenID )
: BaseEncryptionData( aData )
, m_aKey( aKey )
, m_nEncAlg( nEncAlg )
, m_nCheckAlg( nCheckAlg )
, m_nDerivedKeySize( nDerivedKeySize )
+ , m_nStartKeyGenID( nStartKeyGenID )
{}
EncryptionData( const EncryptionData& aData )
@@ -71,6 +73,7 @@ public:
, m_nEncAlg( aData.m_nEncAlg )
, m_nCheckAlg( aData.m_nCheckAlg )
, m_nDerivedKeySize( aData.m_nDerivedKeySize )
+ , m_nStartKeyGenID( aData.m_nStartKeyGenID )
{}
};
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index 915bc26464fd..a6fc36bb0dfb 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -150,6 +150,7 @@ public:
sal_Int32 &rEncAlgorithm,
sal_Int32 &rChecksumAlgorithm,
sal_Int32 &rDerivedKeySize,
+ sal_Int32 &rStartKeyGenID,
sal_Int32 &rSize,
::rtl::OUString& aMediaType,
::com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &rStream );
diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx
index c9fef60c29c7..f7b80f38b359 100644
--- a/package/inc/ZipPackage.hxx
+++ b/package/inc/ZipPackage.hxx
@@ -133,7 +133,7 @@ public:
ZipFile& getZipFile() { return *m_pZipFile;}
sal_Int32 getFormat() const { return m_nFormat; }
- sal_Int32 GetKeyGenID() const { return m_nStartKeyGenerationID; }
+ sal_Int32 GetStartKeyGenID() const { return m_nStartKeyGenerationID; }
sal_Int32 GetEncAlgID() const { return m_nCommonEncryptionID; }
sal_Int32 GetChecksumAlgID() const { return m_nChecksumDigestID; }
sal_Int32 GetDefaultDerivedKeySize() const { return m_nCommonEncryptionID == ::com::sun::star::xml::crypto::CipherID::AES_CBC_W3C_PADDING ? 32 : 16; }
diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx
index 454ea735d0a0..a3bbf73bf84c 100644
--- a/package/inc/ZipPackageStream.hxx
+++ b/package/inc/ZipPackageStream.hxx
@@ -98,7 +98,7 @@ public:
::com::sun::star::uno::Sequence< sal_Int8 > GetEncryptionKey( bool bWinEncoding = false );
- sal_Int32 GetKeyGenID();
+ sal_Int32 GetStartKeyGenID();
const com::sun::star::uno::Sequence < sal_Int8 > getInitialisationVector () const
{ return m_xBaseEncryptionData->m_aInitVector;}