diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-10 23:10:56 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-10 23:10:56 +0100 |
commit | 765f6f8a4c7cc0e9c11a25d4b023567abd3a14b0 (patch) | |
tree | 7d106febcc951f5b332e0e59795539b7ae1bb82f /util-src/hashes.c | |
parent | b47f264e2a9d27cdd0ed32e21439224c2dbefe76 (diff) | |
parent | f0e489b59100e7894bada6a6d8ac8e69b3951aef (diff) | |
download | prosody-765f6f8a4c7cc0e9c11a25d4b023567abd3a14b0.tar.gz prosody-765f6f8a4c7cc0e9c11a25d4b023567abd3a14b0.zip |
Merge with Zash
Diffstat (limited to 'util-src/hashes.c')
-rw-r--r-- | util-src/hashes.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/util-src/hashes.c b/util-src/hashes.c index 33a9be89..317deaf3 100644 --- a/util-src/hashes.c +++ b/util-src/hashes.c @@ -46,14 +46,20 @@ 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(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 } }; |