lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I took the risk of duplicating someone's work and implemented the
> encryption and decryption in LuaCrypto.

Nice, thanks. I was hoping for a thiner binding of openssl/aes.h, even
if the OpenSSL documentation says one should use the EVP interface (like
you have).

Just one comment: it seems the original code was for Lua 5.0 because code like
this

 if (luaL_checkudata(L, i, LUACRYPTO_DIGESTNAME) == NULL) luaL_typerror(L, i, LUACRYPTO_DIGESTNAME);
 return lua_touserdata(L, i);

can be simplified in Lua 5.1 to

 return luaL_checkudata(L, i, LUACRYPTO_DIGESTNAME);

There are a few such instances in the code.
--lhf