[PATCH 1/5] vircrypto: provide constants for hash sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux