summaryrefslogtreecommitdiff
path: root/src/irmd/registry.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-16 12:04:59 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-16 13:40:12 +0200
commit97ef24340da7d3f55a39ba16b400d13f9bbe9e60 (patch)
treee13656c267343db47a4f79d2098222909222736d /src/irmd/registry.c
parentc884fb9d6b3d3ea59f5fc7c5d709bfff4fcf1849 (diff)
downloadouroboros-97ef24340da7d3f55a39ba16b400d13f9bbe9e60.tar.gz
ouroboros-97ef24340da7d3f55a39ba16b400d13f9bbe9e60.zip
ipcpd: Allow specifying the hash algorithm to use
Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported.
Diffstat (limited to 'src/irmd/registry.c')
-rw-r--r--src/irmd/registry.c4
1 files changed, 2 insertions, 2 deletions
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 <ouroboros/logs.h>
#include <ouroboros/irm.h>
#include <ouroboros/time_utils.h>
-#include <ouroboros/hash.h>
#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;