summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/dir.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/ipcpd/normal/dir.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/ipcpd/normal/dir.c')
-rw-r--r--src/ipcpd/normal/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipcpd/normal/dir.c b/src/ipcpd/normal/dir.c
index 0249ba06..5ea8a300 100644
--- a/src/ipcpd/normal/dir.c
+++ b/src/ipcpd/normal/dir.c
@@ -62,7 +62,7 @@ int dir_fini(void)
int dir_reg(const uint8_t * hash)
{
- char hashstr[DIR_HASH_STRLEN + 1];
+ char hashstr[ipcp_dir_hash_strlen() + 1];
int ret;
assert(hash);
@@ -91,7 +91,7 @@ int dir_reg(const uint8_t * hash)
int dir_unreg(const uint8_t * hash)
{
- char hashstr[DIR_HASH_STRLEN + 1];
+ char hashstr[ipcp_dir_hash_strlen() + 1];
size_t len;
assert(hash);
@@ -121,7 +121,7 @@ int dir_unreg(const uint8_t * hash)
int dir_query(const uint8_t * hash)
{
- char hashstr[DIR_HASH_STRLEN + 1];
+ char hashstr[ipcp_dir_hash_strlen() + 1];
size_t len;
dir_path_reset();