summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-07-23 18:45:49 +0200
committerTom Gundersen <teg@jklm.no>2015-07-27 20:34:47 +0200
commit75c0cab158e9da7f78ad040d23cd52720a025659 (patch)
tree01bb7d344a6639b53c6b75646f6c85d517732f36 /src
parentc73ee39d1031f8d7e01448bf1a9810943d7c6560 (diff)
util: base32hex - explain distinction with base32
Diffstat (limited to 'src')
-rw-r--r--src/basic/util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index 7896be8788..1c15fbc172 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -954,7 +954,12 @@ int unhexmem(const char *p, size_t l, void **mem, size_t *len) {
return 0;
}
-/* https://tools.ietf.org/html/rfc4648#section-6 */
+/* https://tools.ietf.org/html/rfc4648#section-6
+ * Notice that base32hex differs from base32 in the alphabet it uses.
+ * The distinction is that the base32hex representation preserves the
+ * order of the underlying data when compared as bytestrings, this is
+ * useful when representing NSEC3 hashes, as one can then verify the
+ * order of hashes directly from their representation. */
char base32hexchar(int x) {
static const char table[32] = "0123456789"
"ABCDEFGHIJKLMNOPQRSTUV";