diff options
author | Eike Rathke <erack@redhat.com> | 2018-02-26 13:18:22 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-02-26 13:19:12 +0100 |
commit | 530465964a487c9633305bc886c7826f97f7f1ce (patch) | |
tree | dfc33a3db957b83880bd1192dae6a60610f04aac /comphelper/qa | |
parent | 389405cc49cb07a5414dd2b7ac10d9a7785e012b (diff) |
Prepare to handle OOXML Agile Encryption password hash as well
... that prepends the iteration count to the hash instead of
appending it
Change-Id: I090393e6337c110029e35baaa259b40ef4e5d416
Diffstat (limited to 'comphelper/qa')
-rw-r--r-- | comphelper/qa/unit/test_hash.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/comphelper/qa/unit/test_hash.cxx b/comphelper/qa/unit/test_hash.cxx index 11dcbd0bd10f..5d2ece34dc83 100644 --- a/comphelper/qa/unit/test_hash.cxx +++ b/comphelper/qa/unit/test_hash.cxx @@ -99,7 +99,7 @@ void TestHash::testSHA512_NoSaltNoSpin() const char* const pInput = ""; std::vector<unsigned char> calculate_hash = comphelper::Hash::calculateHash( reinterpret_cast<const unsigned char*>(pInput), 0, - nullptr, 0, 0, comphelper::HashType::SHA512); + nullptr, 0, 0, false, comphelper::HashType::SHA512); CPPUNIT_ASSERT_EQUAL(size_t(64), calculate_hash.size()); std::string aStr("cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e"); CPPUNIT_ASSERT_EQUAL(aStr, tostring(calculate_hash)); @@ -112,7 +112,7 @@ void TestHash::testSHA512_saltspin() const OUString aPass("pwd"); const OUString aAlgo("SHA-512"); const OUString aSalt("876MLoKTq42+/DLp415iZQ=="); - const OUString aHash = comphelper::DocPasswordHelper::GetOoxHashAsBase64( aPass, aSalt, 100000, aAlgo); + const OUString aHash = comphelper::DocPasswordHelper::GetOoxHashAsBase64( aPass, aSalt, 100000, false, aAlgo); const OUString aStr("5l3mgNHXpWiFaBPv5Yso1Xd/UifWvQWmlDnl/hsCYbFT2sJCzorjRmBCQ/3qeDu6Q/4+GIE8a1DsdaTwYh1q2g=="); CPPUNIT_ASSERT_EQUAL(aStr, aHash); } |