about summary refs log tree commit diff
path: root/src/libutil/hash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/hash.cc')
-rw-r--r--src/libutil/hash.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc
index 697a6b475b13..de2c1ebd724f 100644
--- a/src/libutil/hash.cc
+++ b/src/libutil/hash.cc
@@ -153,6 +153,12 @@ string printHash32(const Hash & hash)
 }
 
 
+string printHash16or32(const Hash & hash)
+{
+    return hash.type == htMD5 ? printHash(hash) : printHash32(hash);
+}
+
+
 static bool mul(unsigned char * bytes, unsigned char y, int maxSize)
 {
     unsigned char carry = 0;