comphelper/source/misc/hash.cxx | 6 ++++++ include/comphelper/hash.hxx | 1 + 2 files changed, 7 insertions(+)
New commits: commit cf45dda9a515e92d97dc6202b78f0dd1a41781a2 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Fri Apr 21 05:51:26 2017 +0200 add MD5 hashing to generic digest class Change-Id: If3abc80f8511d9c7bf0d5197ce28ef4cf60a6b45 Reviewed-on: https://gerrit.libreoffice.org/36792 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index eaefd59003c3..5e250f1ed0d3 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -31,6 +31,8 @@ struct HashImpl { switch (meType) { + case HashType::MD5: + return HASH_AlgMD5; case HashType::SHA1: return HASH_AlgSHA1; case HashType::SHA256: @@ -48,6 +50,8 @@ struct HashImpl { switch (meType) { + case HashType::MD5: + return EVP_md5(); case HashType::SHA1: return EVP_sha1(); case HashType::SHA256: @@ -121,6 +125,8 @@ size_t Hash::getLength() const { switch (mpImpl->meType) { + case HashType::MD5: + return 16; case HashType::SHA1: return 20; case HashType::SHA256: diff --git a/include/comphelper/hash.hxx b/include/comphelper/hash.hxx index c14c6c748fee..d8145604ac6b 100644 --- a/include/comphelper/hash.hxx +++ b/include/comphelper/hash.hxx @@ -16,6 +16,7 @@ namespace comphelper { enum class HashType { + MD5, SHA1, SHA256, SHA512 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits