我在一个在线AES加解密的网站上测试是可以的,但是请问一下就如下面这个截图,在resty里怎么实现呢?
![]()
我的代码如下:
function _M:decrypt(key,plain)
local aes_default = aes:new(ngx.decode_base64("十六进制key的base64编码"),nil,aes.cipher(256,"ecb"))
local decrypted = aes_default:decrypt(ngx.decode_base64(plain也是十六进制的base64编码))
return decrypted
end
但是decrypted是nil
请各位指教 谢谢
On Wednesday, May 25, 2016 at 6:07:28 PM UTC+8, Andy Cheung wrote: