Changeset

4829:0ebc636faa59

util.hashes: Add sha224, sha384, sha512
author Kim Alvefur <zash@zash.se>
date Thu, 10 May 2012 05:57:24 +0200 (2012-05-10)
parents 4828:f3e841521436
children 4830:ea907059a90e
files util-src/hashes.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/hashes.c	Wed May 09 01:26:56 2012 +0200
+++ b/util-src/hashes.c	Thu May 10 05:57:24 2012 +0200
@@ -47,13 +47,19 @@
 }
 
 MAKE_HASH_FUNCTION(Lsha1, SHA1, SHA_DIGEST_LENGTH)
+MAKE_HASH_FUNCTION(Lsha224, SHA224, SHA224_DIGEST_LENGTH)
 MAKE_HASH_FUNCTION(Lsha256, SHA256, SHA256_DIGEST_LENGTH)
+MAKE_HASH_FUNCTION(Lsha384, SHA384, SHA384_DIGEST_LENGTH)
+MAKE_HASH_FUNCTION(Lsha512, SHA512, SHA512_DIGEST_LENGTH)
 MAKE_HASH_FUNCTION(Lmd5, MD5, MD5_DIGEST_LENGTH)
 
 static const luaL_Reg Reg[] =
 {
 	{ "sha1",	Lsha1	},
+	{ "sha224",	Lsha224	},
 	{ "sha256",	Lsha256	},
+	{ "sha384",	Lsha384	},
+	{ "sha512",	Lsha512	},
 	{ "md5",	Lmd5	},
 	{ NULL,		NULL	}
 };