lua-users home
lua-l archive

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


Hello,
i've yet another problem with lxyssl. It simply doesn't seem to work:

function ex2()
key='abcdabcdabcdabcd'
data="">
iv=lxyssl.hash('md5'):digest(key)
e=lxyssl.aes(key):cfb_encrypt(data .. "a",iv)
d=lxyssl.aes(key):cfb_decrypt(e,iv)
assert(d==data .."a")
end

the main problem is: 'e' is empty..

Looking at the implementation of cfb_encrypt, it seems to me that the result is correctly pushed back into the stack..why can't I print it?

Any idea?

(for your curiosity, C implementation is here: http://code.google.com/p/luaxyssl/source/browse/tags/0.2/lxyssl.c#934 )

Thanks,
Valerio