about summary refs log tree commit diff
path: root/src/libutil/hash.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-23T16·05+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-23T16·05+0200
commit4c34d384e68ce7e2c949a7588d80bbe7d5a96440 (patch)
tree7a60f33812b8009e105bd43ce7cc1f19dec413b2 /src/libutil/hash.hh
parenta28b4445a4eb8108dfc028083d3939d5f3a42685 (diff)
If hashes do not match, print them in base-32 for SHA-1/SHA-256
Fixes #57.
Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r--src/libutil/hash.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index 781f517428d0..2c6f176ec74c 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -54,6 +54,9 @@ unsigned int hashLength32(const Hash & hash);
 /* Convert a hash to a base-32 representation. */
 string printHash32(const Hash & hash);
 
+/* Print a hash in base-16 if it's MD5, or base-32 otherwise. */
+string printHash16or32(const Hash & hash);
+
 /* Parse a base-32 representation of a hash code. */
 Hash parseHash32(HashType ht, const string & s);