From 95ba1c2f6e200c40e4f39dd277978712c95434c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 11 May 2018 15:42:35 +0200 Subject: [PATCH] vircrypto: provide constants for hash sizes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The callers needing to know the size of the resulting digest rely on _DIGEST_SIZE constants from gnulib. Introduce VIR_CRYPTO_HASH_SIZE_ constants to remove the dependency. Signed-off-by: Ján Tomko --- src/util/vircrypto.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/vircrypto.h b/src/util/vircrypto.h index 068602f5df..81743d2f74 100644 --- a/src/util/vircrypto.h +++ b/src/util/vircrypto.h @@ -23,6 +23,9 @@ # include "internal.h" +# define VIR_CRYPTO_HASH_SIZE_MD5 16 +# define VIR_CRYPTO_HASH_SIZE_SHA256 32 + typedef enum { VIR_CRYPTO_HASH_MD5, /* Don't use this except for historic compat */ VIR_CRYPTO_HASH_SHA256,