Changeset

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
parents 4827:fefbfd76d2d3
children 4829:0ebc636faa59
files util-src/hashes.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
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[] =
 {