From 701c5f48110cb004925ba659b7221b18713ad2c7 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 22 Apr 2020 21:38:36 +0200 Subject: util.hashes: Fix output length of PBKDF2-HMAC-SHA256 Somehow it got SHA1's 20 byte output instead of the proper 32 = 256/8 --- util-src/hashes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util-src') 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; } -- cgit v1.2.3