diff options
author | Kim Alvefur <zash@zash.se> | 2012-05-10 05:57:24 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-05-10 05:57:24 +0200 |
commit | 150e5e4aecd35aa736a6eb053e1da2f68355d50e (patch) | |
tree | 819dfb28c05650b9e7048dc26a00450370ceef3b | |
parent | ce764dee87dc63387c9327179d022bf792e77123 (diff) | |
download | prosody-150e5e4aecd35aa736a6eb053e1da2f68355d50e.tar.gz prosody-150e5e4aecd35aa736a6eb053e1da2f68355d50e.zip |
util.hashes: Add sha224, sha384, sha512
-rw-r--r-- | util-src/hashes.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util-src/hashes.c b/util-src/hashes.c index 7d263a78..317deaf3 100644 --- a/util-src/hashes.c +++ b/util-src/hashes.c @@ -47,13 +47,19 @@ static int myFunc(lua_State *L) { \ } 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 } }; |