comphelper/source/misc/docpasswordhelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 21b593e45587a196e294eb628546d6141a6959d8 Author: Eike Rathke <er...@redhat.com> Date: Mon Feb 26 13:28:44 2018 +0100 Accept also "SHA1" for "SHA-1" even if not specified From oox/source/crypto/AgileEngine.cxx hashCalc() it looks as if "SHA1" is used in the wild instead of the "SHA-1" specified in https://msdn.microsoft.com/en-us/library/dd925810 But maybe that's just wrong and followed the "SHA512" without hyphen. Who knows.. accept both. Change-Id: Ie1c3b4adf66541a4b8d8b83a1c49df235f30cf04 diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 97b06af2e689..5dfd25575d91 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -271,7 +271,7 @@ css::uno::Sequence<sal_Int8> DocPasswordHelper::GetOoxHashAsSequence( eType = comphelper::HashType::SHA512; else if (rAlgorithmName == "SHA-256" || rAlgorithmName == "SHA256") eType = comphelper::HashType::SHA256; - else if (rAlgorithmName == "SHA-1") + else if (rAlgorithmName == "SHA-1" || rAlgorithmName == "SHA1") // "SHA1" might be in the wild eType = comphelper::HashType::SHA1; else if (rAlgorithmName == "MD5") eType = comphelper::HashType::MD5; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits