From: Ján Tomko Date: Fri, 11 May 2018 13:42:35 +0000 (+0200) Subject: vircrypto: provide constants for hash sizes X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=95ba1c2f6e200c40e4f39dd277978712c95434c6;p=libvirt.git vircrypto: provide constants for hash sizes 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 --- 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,