lua-resty-nettle icon indicating copy to clipboard operation
lua-resty-nettle copied to clipboard

how to use DES3 with ecb mod?

Open outshow opened this issue 5 years ago • 3 comments

I try the codes below ` local ds, wk = des.new(key, "ecb", iv)

if wk then print("error, wk: ", wk) end return self:base64_encode(ds:encrypt(content)) ` and get an error: luajit: ../resty/nettle/des.lua:137: attempt to index field 'cipher' (a nil value)

Could you give me some hint please?

outshow avatar Jun 24 '20 02:06 outshow

Oh, that is a bug it seems.

bungle avatar Aug 26 '20 19:08 bungle

@outshow,

Oh, wait, the ecb does not use iv, so please do not specify it.

bungle avatar Aug 26 '20 19:08 bungle

@outshow sorry for late answer, I was on summer holidays.

bungle avatar Aug 26 '20 19:08 bungle