diff options
Diffstat (limited to 'oox/source/crypto/Standard2007Engine.cxx')
-rw-r--r-- | oox/source/crypto/Standard2007Engine.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx index 311fea7f930e..bcaba3052aeb 100644 --- a/oox/source/crypto/Standard2007Engine.cxx +++ b/oox/source/crypto/Standard2007Engine.cxx @@ -182,9 +182,8 @@ bool Standard2007Engine::decrypt( BinaryXInputStream& aInputStream, BinaryXOutputStream& aOutputStream) { - sal_uInt32 totalSize; - aInputStream >> totalSize; // Document unencrypted size - 4 bytes - aInputStream.skip( 4 ); // Reserved 4 Bytes + aInputStream.skip(4); // Document unencrypted size - 4 bytes + aInputStream.skip(4); // Reserved 4 Bytes vector<sal_uInt8> iv; Decrypt aDecryptor(mKey, iv, Crypto::AES_128_ECB); @@ -227,9 +226,9 @@ bool Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOu sal_uInt32 encryptionHeaderSize = static_cast<sal_uInt32>(sizeof(EncryptionStandardHeader)); - rStream << mInfo.header.flags; + rStream.WriteUInt32( mInfo.header.flags ); sal_uInt32 headerSize = encryptionHeaderSize + cspNameSize; - rStream << headerSize; + rStream.WriteUInt32( headerSize ); rStream.writeMemory(&mInfo.header, encryptionHeaderSize); rStream.writeUnicodeArray(lclCspName); |