diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-28 16:56:31 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-28 17:02:09 +0200 |
commit | 2f9d2919e1cc73e68403b14fea1ffc92c798b23a (patch) | |
tree | bc17e2dcda11f883527d8c83b3f5a57098229cd1 /oox/source/crypto/Standard2007Engine.cxx | |
parent | f306af880b702d8d7e869f78240e52c8d79a138d (diff) |
remove outputLength variable when calculating encryption verifier
Change-Id: I144957b64ba2b693db61c17e42b08014124f8c99
Diffstat (limited to 'oox/source/crypto/Standard2007Engine.cxx')
-rw-r--r-- | oox/source/crypto/Standard2007Engine.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx index 09035d7409f8..299d25117722 100644 --- a/oox/source/crypto/Standard2007Engine.cxx +++ b/oox/source/crypto/Standard2007Engine.cxx @@ -72,7 +72,6 @@ bool Standard2007Engine::generateVerifier() if (mKey.size() != 16) return false; - sal_uInt32 outputLength; vector<sal_uInt8> verifier(ENCRYPTED_VERIFIER_LENGTH); vector<sal_uInt8> encryptedVerifier(ENCRYPTED_VERIFIER_LENGTH); @@ -80,8 +79,7 @@ bool Standard2007Engine::generateVerifier() vector<sal_uInt8> iv; Encrypt aEncryptorVerifier(mKey, iv, Crypto::AES_128_ECB); - outputLength = aEncryptorVerifier.update(encryptedVerifier, verifier); - if (outputLength != ENCRYPTED_VERIFIER_LENGTH) + if (aEncryptorVerifier.update(encryptedVerifier, verifier) != ENCRYPTED_VERIFIER_LENGTH) return false; std::copy(encryptedVerifier.begin(), encryptedVerifier.end(), mInfo.verifier.encryptedVerifier); @@ -93,7 +91,7 @@ bool Standard2007Engine::generateVerifier() vector<sal_uInt8> encryptedHash(ENCRYPTED_VERIFIER_HASH_LENGTH, 0); Encrypt aEncryptorHash(mKey, iv, Crypto::AES_128_ECB); - outputLength = aEncryptorHash.update(encryptedHash, hash, hash.size()); + aEncryptorHash.update(encryptedHash, hash, hash.size()); std::copy(encryptedHash.begin(), encryptedHash.end(), mInfo.verifier.encryptedVerifierHash); return true; |