aboutsummaryrefslogtreecommitdiff
path: root/crypto/hash.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-03-11 18:33:08 +0000
committerDaniel P. Berrange <berrange@redhat.com>2016-07-04 15:52:36 +0100
commit9164b89762224db414676973172c26994aa9e2e5 (patch)
treedb509ee669f5195c4d240b45929854ab7a06a1f3 /crypto/hash.c
parent0c16c056a4f9dec18fdd56feec82a5db9ff3c15e (diff)
crypto: implement sha224, sha384, sha512 and ripemd160 hashes
Wire up the nettle and gcrypt hash backends so that they can support the sha224, sha384, sha512 and ripemd160 hash algorithms. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'crypto/hash.c')
-rw-r--r--crypto/hash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/hash.c b/crypto/hash.c
index aa2a26e8a6..0f1ceac66a 100644
--- a/crypto/hash.c
+++ b/crypto/hash.c
@@ -25,7 +25,11 @@
static size_t qcrypto_hash_alg_size[QCRYPTO_HASH_ALG__MAX] = {
[QCRYPTO_HASH_ALG_MD5] = 16,
[QCRYPTO_HASH_ALG_SHA1] = 20,
+ [QCRYPTO_HASH_ALG_SHA224] = 28,
[QCRYPTO_HASH_ALG_SHA256] = 32,
+ [QCRYPTO_HASH_ALG_SHA384] = 48,
+ [QCRYPTO_HASH_ALG_SHA512] = 64,
+ [QCRYPTO_HASH_ALG_RIPEMD160] = 20,
};
size_t qcrypto_hash_digest_len(QCryptoHashAlgorithm alg)