From 569825264466b743f741514f117afae29c4b8dad Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 5 May 2020 09:50:35 +0100 Subject: [PATCH] [Minor] Fix some issues found --- src/lua/lua_cryptobox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c index 12f3e063f..b0f5f0bac 100644 --- a/src/lua/lua_cryptobox.c +++ b/src/lua/lua_cryptobox.c @@ -2661,7 +2661,7 @@ lua_cryptobox_secretbox_decrypt (lua_State *L) TRUE); gint text_pos = lua_gettop (L); - if (crypto_secretbox_easy ((guchar *)out->start, in, inlen, + if (crypto_secretbox_open_easy ((guchar *)out->start, in, inlen, nonce, sbox->sk) == 0) { lua_pushboolean (L, true); lua_pushvalue (L, text_pos); /* Prevent gc by copying in stack */ @@ -2717,7 +2717,7 @@ static gint lua_load_cryptobox_secretbox (lua_State * L) { lua_newtable (L); - luaL_register (L, NULL, cryptoboxhashlib_f); + luaL_register (L, NULL, cryptoboxsecretboxlib_f); return 1; } -- 2.39.5