From 97ef24340da7d3f55a39ba16b400d13f9bbe9e60 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sun, 16 Apr 2017 12:04:59 +0200 Subject: ipcpd: Allow specifying the hash algorithm to use Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported. --- src/irmd/registry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/irmd/registry.c') diff --git a/src/irmd/registry.c b/src/irmd/registry.c index 71e6ea8a..e6571564 100644 --- a/src/irmd/registry.c +++ b/src/irmd/registry.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "registry.h" #include "utils.h" @@ -522,6 +521,7 @@ struct reg_entry * registry_get_entry(struct list_head * registry, } struct reg_entry * registry_get_entry_by_hash(struct list_head * registry, + enum hash_algo algo, const uint8_t * hash, size_t len) { @@ -536,7 +536,7 @@ struct reg_entry * registry_get_entry_by_hash(struct list_head * registry, list_for_each(p, registry) { struct reg_entry * e = list_entry(p, struct reg_entry, next); - get_hash(thash, e->name); + str_hash(algo, thash, e->name); if (memcmp(thash, hash, len) == 0) { free(thash); return e; -- cgit v1.2.3