lua-resty-authcode
Discuzx AuthCode For Lua
$ opm get qiqizjl/lua-resty-authcode
Name
lua-resty-authcode - DiscuzX AuthCode For Lua
Status
This library is production ready.
Synopsis
Some simple examples:
http {
...
lua_package_path "/path/to/lua-resty-authcode/lib/?.lua;;";
...
}
server{
...
content_by_lua_block {
local authcode = require "resty.authcode"
local result = authcode:authcode("2617ibqLZGzCIvf/q0HPtQQvPizyRgYTF1bwbQ6KLlncHc8TOUi9D6s","DECODE","123123123")
ngx.say(result)
}
...
}
Methods
autcode
syntax: result = authcode:authcode(str,operation,key,expiry)
strString that needs to be manipulated
operationAction.
ENCODEorDECODEkeyKey required for encryption
expiryEncrypted string expiration time, beyond aging will not be decrypted. Default 0, permanent valid
Authors
NaiXiaoXin
License
mit
Versions
-
Discuzx AuthCode For Lua 2018-09-09 17:44:51