aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/hashes.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-04-22 21:38:36 +0200
committerKim Alvefur <zash@zash.se>2020-04-22 21:38:36 +0200
commitd146b0d68af64e2dc0ba49e29301b2433dae02bf (patch)
tree0265866d671b88b235c1f5c6d4c0d8444e8bc99e /util-src/hashes.c
parent91e76bc97e5dfad413507e93f9a66023a368c3ff (diff)
downloadprosody-d146b0d68af64e2dc0ba49e29301b2433dae02bf.tar.gz
prosody-d146b0d68af64e2dc0ba49e29301b2433dae02bf.zip
util.hashes: Fix output length of PBKDF2-HMAC-SHA256
Somehow it got SHA1's 20 byte output instead of the proper 32 = 256/8
Diffstat (limited to 'util-src/hashes.c')
-rw-r--r--util-src/hashes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-src/hashes.c b/util-src/hashes.c
index 51c7611c..84a604ef 100644
--- a/util-src/hashes.c
+++ b/util-src/hashes.c
@@ -129,7 +129,7 @@ static int Lpbkdf2_sha256(lua_State *L) {
return luaL_error(L, "PKCS5_PBKDF2_HMAC() failed");
}
- lua_pushlstring(L, (char *)out, SHA_DIGEST_LENGTH);
+ lua_pushlstring(L, (char *)out, SHA256_DIGEST_LENGTH);
return 1;
}