diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-20 13:41:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-20 13:41:03 +0100 |
commit | 491884350ce74f36044b3348bd66356ad1c234af (patch) | |
tree | 20e8b289a5becc8c9c93e9f4419e8535145703f9 /oox | |
parent | fcf7f503b64b2cf7dbef019fb43dde033e3538e8 (diff) |
hash len is 20 for xls cryptoapi configuration
Change-Id: I6e06b8578959b8147043179db57e875b1d98d57d
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/crypto/Standard2007Engine.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx index 34fa2265a719..98b94a173940 100644 --- a/oox/source/crypto/Standard2007Engine.cxx +++ b/oox/source/crypto/Standard2007Engine.cxx @@ -90,9 +90,9 @@ bool Standard2007Engine::generateVerifier() vector<sal_uInt8> hash(RTL_DIGEST_LENGTH_SHA1, 0); mInfo.verifier.encryptedVerifierHashSize = RTL_DIGEST_LENGTH_SHA1; Digest::sha1(hash, verifier); - hash.resize(ENCRYPTED_VERIFIER_HASH_LENGTH, 0); + hash.resize(ENCRYPTED_AES_VERIFIER_HASH_LENGTH, 0); - vector<sal_uInt8> encryptedHash(ENCRYPTED_VERIFIER_HASH_LENGTH, 0); + vector<sal_uInt8> encryptedHash(ENCRYPTED_AES_VERIFIER_HASH_LENGTH, 0); Encrypt aEncryptorHash(mKey, iv, Crypto::AES_128_ECB); aEncryptorHash.update(encryptedHash, hash, hash.size()); @@ -162,10 +162,10 @@ bool Standard2007Engine::generateEncryptionKey(const OUString& password) mInfo.verifier.encryptedVerifier + ENCRYPTED_VERIFIER_LENGTH, encryptedVerifier.begin()); - vector<sal_uInt8> encryptedHash(ENCRYPTED_VERIFIER_HASH_LENGTH); + vector<sal_uInt8> encryptedHash(ENCRYPTED_AES_VERIFIER_HASH_LENGTH); std::copy( mInfo.verifier.encryptedVerifierHash, - mInfo.verifier.encryptedVerifierHash + ENCRYPTED_VERIFIER_HASH_LENGTH, + mInfo.verifier.encryptedVerifierHash + ENCRYPTED_AES_VERIFIER_HASH_LENGTH, encryptedHash.begin()); vector<sal_uInt8> verifier(encryptedVerifier.size(), 0); |