From bdfb62b405a3588e4ce72e02c5e6cee7b977efdb Mon Sep 17 00:00:00 2001 From: marshmellow42 Date: Tue, 28 Apr 2015 15:53:07 -0400 Subject: [PATCH 1/1] Iceman's script aes fix #93 Thanks Iceman (note I did not have a tag to double test this one. :) --- client/scripting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/scripting.c b/client/scripting.c index 0ccdeeec..d7f51c23 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -261,7 +261,7 @@ static int l_aes(lua_State *L) aes_context ctx; aes_init(&ctx); - aes_setkey_enc(&ctx,(const unsigned char *)p_key,128); + aes_setkey_dec(&ctx, aes_key, 128); aes_crypt_cbc(&ctx,AES_DECRYPT,sizeof(indata), iv, indata,outdata ); //Push decrypted array as a string lua_pushlstring(L,(const char *)&outdata, sizeof(outdata)); -- 2.39.5