Diff

util-src/hashes.c @ 10748:93293891709b

util.hashes: Fix output length of PBKDF2-HMAC-SHA256 Somehow it got SHA1's 20 byte output instead of the proper 32 = 256/8
author Kim Alvefur <zash@zash.se>
date Wed, 22 Apr 2020 21:38:36 +0200
parent 10480:94cacf9fd0ae
child 11560:3bbb1af92514
line wrap: on
line diff
--- a/util-src/hashes.c	Wed Apr 22 21:35:33 2020 +0200
+++ b/util-src/hashes.c	Wed Apr 22 21:38:36 2020 +0200
@@ -129,7 +129,7 @@
 		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;
 }