openresty / lua-resty-string

String utilities and common hash functions for ngx_lua and LuaJIT
429 stars 143 forks source link

ecb模式下 pkcs7如何设置 #77

Closed ytd7777 closed 4 years ago

ytd7777 commented 4 years ago

aes:new("1234567890123456",nil,aes.cipher(128,"ecb"),nil) 加密出来字符客户端不能解密,似乎是 pkcs7没设置,请问该如何设置?

ytd7777 commented 4 years ago

aes:new("1234567890123456",nil,aes.cipher(128,"ecb"),{method = function(key)return key end, iv = string.rep(string.char(0), 16)}) 测试可用