Software /
code /
prosody
Diff
util-src/hashes.c @ 4828:f3e841521436
util.hashes: Use defined hash function output lengths.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 09 May 2012 01:26:56 +0200 |
parent | 2923:b7049746bd29 |
child | 4829:0ebc636faa59 |
line wrap: on
line diff
--- a/util-src/hashes.c Wed May 09 01:11:27 2012 +0200 +++ b/util-src/hashes.c Wed May 09 01:26:56 2012 +0200 @@ -46,9 +46,9 @@ 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[] = {