Re: Storing passwords
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Storing passwords
- From: Tomas Guisasola Gorham <tomas@...>
- Date: 2012年5月21日 14:21:49 -0300 (BRT)
Hi Paco
On 2012年5月21日, Philippe Lhoste wrote:
On 21/05/2012 15:04, Paco Willers wrote:
I wish to continue my developing on a
server which
doesn't have the crypto C library installed which luacrypto depends on, so
I cannot use
luacrypto here. Is it possible to do hash encrypting in a Lua-only manner?
On the Lua wiki
I saw an article: it is possible with Lua 5.2. Can I switch to Lua 5.2 and
still use Lua
modules/libs that are written for Lua 5.1? (luasocket, coxpcall, copas)
Any tips are welcome.
Indeed, Lua 5.2 has binary operators allowing to compute MD5 or similar
algorithms. Probably slower than a C version, but I suppose you won't check
thousands of password per second, so it should be OK.
AFAIK, most Lua libraries with native C code will need to be recompiled for
Lua 5.2. I had to do that for lfs, luasocket, lpeg...
If you don't mind using a C library with a binding for Lua,
you should try md5:
http://www.keplerproject.org/md5/
It can also be installed via LuaRocks:
http://luarocks.org/repositories/rocks/#md5
Regards,
Tomás