I installed the subsystem(ubuntu) under win10,and installed openresty via apt-get, and installed luarocks 2.4 、lapis 1.7。
When i learn openresty, i found the aes model always return null。。。。the code like this:
local aes = require "resty.aes"
local str = require "resty.string"
local iv = ngx.decode_base64(self.params.iv)
local data = ngx.decode_base64(self.params.encryptedData)
local sessionKey = ngx.decode_base64self.params.sessionKey)
local myAes = assert(aes:new(sessionKey, nil, aes.cipher(128, "cbc"), {iv=iv, method=nil}))
print(json.encode(myAes:decrypt(data ))) -- -> show null
And the system report: 2018/05/09 14:17:13 [alert] 47#47: ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt)
I installed the subsystem(ubuntu) under win10,and installed openresty via apt-get, and installed luarocks 2.4 、lapis 1.7。
When i learn openresty, i found the aes model always return null。。。。the code like this:
And the system report: 2018/05/09 14:17:13 [alert] 47#47: ignoring stale global SSL error (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt)