diff options
-rw-r--r-- | comphelper/source/misc/hash.cxx | 6 | ||||
-rw-r--r-- | include/comphelper/hash.hxx | 1 |
2 files changed, 7 insertions, 0 deletions
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 |