views:

128

answers:

3

Hi,

I'm looking for a library or wrapper for Lua to use some cryptographic functions. Initially I only need to create SHA-1 hashs.

Any tips or suggestion are appreciated.

+2  A: 

See http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lmd5

lhf
i installed this one, but i can`t find any documentation to begin. So, i have it, but don`t know how to use it.
fpinheiro
http://www.keplerproject.org/md5/ contains some documentation.
ponzao
Some very basic instructions are inside the .tar.gz: digest library: __tostring(c) new() version clone(c) reset(c) digest(c or s,[raw]) update(c,s) There is also a test.lua in the archive that shows you the library in action...
daurnimator
If you have any questions, post here or contact me directly.
lhf
but it doesnt work with SHA-1. At least i didnt found it in the documentation.
fpinheiro
"make sha1" should do it.
lhf
A: 

or luacrypto

Doug Currie
A: 

If you plan to do some encryption/decryption or public key cryptography later, you can take a look at my fork of luacrypto at http://github.com/mkottman/luacrypto , which is a binding to OpenSSL, and provides hashing, HMAC, symetric cryptograhy and asymetric signing/verifying.

The API is relatively simple, the reference is located here: http://mkottman.github.com/luacrypto/manual.html

MiKy
do you know how to get luacrypto to work on windows?
fpinheiro