提交 58999ddc 编写于 作者: 李光春's avatar 李光春

- 优化Api加密解密

上级 5a45bcc1
## v6.0.97 / 2020-07-18
## v6.0.92 / 2020-07-18
- 优化Api加密解密
## v6.0.91 / 2020-07-18
- 修复请求门面手机设备类型
## v6.0.90 / 2020-07-18
......
......@@ -193,9 +193,8 @@ class ApiController extends stdClass
/**
* 验证接口签名
* @param string $name
*/
public function _judgeSign($name = 'sniff_h5')
public function _judgeSign()
{
// 加密的数据参数
$aes = $this->request->post('aes', '');
......@@ -209,7 +208,7 @@ class ApiController extends stdClass
$this->error('数据异常!', 105);
}
// 解密
$aes_decode = $this->decrypt($aes, $name, $timestamp);
$aes_decode = $this->decrypt($aes, $timestamp);
if (empty($aes_decode)) {
$this->error('解密失败', 106);
}
......@@ -247,11 +246,10 @@ class ApiController extends stdClass
/**
* 解密
* @param string $data
* @param string $name
* @param int $timestamp
* @return bool|false|string
*/
private function decrypt(string $data, string $name, int $timestamp)
private function decrypt(string $data, int $timestamp)
{
if (empty($this->aes_md5)) {
$this->setAesMd5();
......
......@@ -28,7 +28,7 @@ use think\db\exception\ModelNotFoundException;
/**
* 定义当前版本
*/
const VERSION = '6.0.91';
const VERSION = '6.0.92';
if (!function_exists('get_ip_info')) {
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册