diff options
author | Kim Alvefur <zash@zash.se> | 2019-01-13 13:57:18 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-01-13 13:57:18 +0100 |
commit | 701d64ed8507cf2becd68a4285b66d340f0d9e5a (patch) | |
tree | 16fdfc5f311ad0173cad282ea0e5a8f8bf72a235 /util-src/hashes.c | |
parent | 2a2cdcecdf15dc13f939cf9b83959e9929a94eb4 (diff) | |
download | prosody-701d64ed8507cf2becd68a4285b66d340f0d9e5a.tar.gz prosody-701d64ed8507cf2becd68a4285b66d340f0d9e5a.zip |
util.hashes: Rename PBKDF2 function
It's not SCRAM-specific
Diffstat (limited to 'util-src/hashes.c')
-rw-r--r-- | util-src/hashes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util-src/hashes.c b/util-src/hashes.c index 75eb116d..7e790e9f 100644 --- a/util-src/hashes.c +++ b/util-src/hashes.c @@ -99,7 +99,7 @@ MAKE_HMAC_FUNCTION(Lhmac_sha256, EVP_sha256, SHA256_DIGEST_LENGTH, SHA256_CTX) MAKE_HMAC_FUNCTION(Lhmac_sha512, EVP_sha512, SHA512_DIGEST_LENGTH, SHA512_CTX) MAKE_HMAC_FUNCTION(Lhmac_md5, EVP_md5, MD5_DIGEST_LENGTH, MD5_CTX) -static int LscramHi(lua_State *L) { +static int Lpbkdf2_sha1(lua_State *L) { unsigned char out[SHA_DIGEST_LENGTH]; size_t pass_len, salt_len; @@ -127,7 +127,8 @@ static const luaL_Reg Reg[] = { { "hmac_sha256", Lhmac_sha256 }, { "hmac_sha512", Lhmac_sha512 }, { "hmac_md5", Lhmac_md5 }, - { "scram_Hi_sha1", LscramHi }, + { "scram_Hi_sha1", Lpbkdf2_sha1 }, /* COMPAT */ + { "pbkdf2_hmac_sha1", Lpbkdf2_sha1 }, { NULL, NULL } }; |