diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-04-21 05:51:26 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-04-29 07:55:10 +0200 |
commit | cf45dda9a515e92d97dc6202b78f0dd1a41781a2 (patch) | |
tree | 73c91aee9f0c9ab1f8e5869864d7a42a89715545 /comphelper | |
parent | da8aa9ea1521a0c02e97299b58990721467fc126 (diff) |
add MD5 hashing to generic digest class
Change-Id: If3abc80f8511d9c7bf0d5197ce28ef4cf60a6b45
Reviewed-on: https://gerrit.libreoffice.org/36792
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/hash.cxx | 6 |
1 files changed, 6 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: |