aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/hashes.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-05-09 01:26:56 +0200
committerKim Alvefur <zash@zash.se>2012-05-09 01:26:56 +0200
commitce764dee87dc63387c9327179d022bf792e77123 (patch)
tree6b22f07c758b160987dc88534cae0c0dd4642a9d /util-src/hashes.c
parent79dfc716bdd1fd994972f578f8347952ec78ba81 (diff)
downloadprosody-ce764dee87dc63387c9327179d022bf792e77123.tar.gz
prosody-ce764dee87dc63387c9327179d022bf792e77123.zip
util.hashes: Use defined hash function output lengths.
Diffstat (limited to 'util-src/hashes.c')
-rw-r--r--util-src/hashes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-src/hashes.c b/util-src/hashes.c
index 33a9be89..7d263a78 100644
--- a/util-src/hashes.c
+++ b/util-src/hashes.c
@@ -46,9 +46,9 @@ static int myFunc(lua_State *L) { \
return 1; \
}
-MAKE_HASH_FUNCTION(Lsha1, SHA1, 20)
-MAKE_HASH_FUNCTION(Lsha256, SHA256, 32)
-MAKE_HASH_FUNCTION(Lmd5, MD5, 16)
+MAKE_HASH_FUNCTION(Lsha1, SHA1, SHA_DIGEST_LENGTH)
+MAKE_HASH_FUNCTION(Lsha256, SHA256, SHA256_DIGEST_LENGTH)
+MAKE_HASH_FUNCTION(Lmd5, MD5, MD5_DIGEST_LENGTH)
static const luaL_Reg Reg[] =
{