diff options
author | Eike Rathke <erack@redhat.com> | 2018-02-26 13:28:44 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-02-26 13:28:52 +0100 |
commit | 21b593e45587a196e294eb628546d6141a6959d8 (patch) | |
tree | 0d53b822f4c85b545f2cd848cb9f1fc446aa7136 /comphelper/source/misc | |
parent | 530465964a487c9633305bc886c7826f97f7f1ce (diff) |
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
Diffstat (limited to 'comphelper/source/misc')
-rw-r--r-- | comphelper/source/misc/docpasswordhelper.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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; |