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 <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2018-05-11 15:42:35 +02:00
parent 57b8df9219
commit 95ba1c2f6e

View File

@ -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,