|
@@ -151,7 +151,7 @@ class RensheService
|
|
private function _enDataCbc()
|
|
private function _enDataCbc()
|
|
{
|
|
{
|
|
$data = $this->_time . json_encode($this->_data);
|
|
$data = $this->_time . json_encode($this->_data);
|
|
- return base64_encode(http_request('http://10.10.10.63/sm4_en.php', 'POST', ['data' => $data]));
|
|
|
|
|
|
+ return base64_encode(http_request('http://sm4.jinjianghc.com/encode.php', 'POST', ['data' => $data]));
|
|
// return base64_encode(openssl_encrypt($data, "SM4", self::KEY, 0, self::IV));
|
|
// return base64_encode(openssl_encrypt($data, "SM4", self::KEY, 0, self::IV));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -162,7 +162,7 @@ class RensheService
|
|
*/
|
|
*/
|
|
private function _deDataCbc($data)
|
|
private function _deDataCbc($data)
|
|
{
|
|
{
|
|
- $res = http_request('http://10.10.10.63/sm4_de.php', 'POST', ['data' => base64_decode($data)]);
|
|
|
|
|
|
+ $res = http_request('http://sm4.jinjianghc.com/decode.php', 'POST', ['data' => base64_decode($data)]);
|
|
// $res = openssl_decrypt(base64_decode($data), "SM4", self::KEY, 0, self::IV);
|
|
// $res = openssl_decrypt(base64_decode($data), "SM4", self::KEY, 0, self::IV);
|
|
if ($res[0] != "{") {
|
|
if ($res[0] != "{") {
|
|
$res = mb_substr($res, 14, strlen($res), 'UTF-8');
|
|
$res = mb_substr($res, 14, strlen($res), 'UTF-8');
|
|
@@ -181,7 +181,7 @@ class RensheService
|
|
Log::info($this->_log_name . ':' . json_encode($this->_data));
|
|
Log::info($this->_log_name . ':' . json_encode($this->_data));
|
|
|
|
|
|
//请求头
|
|
//请求头
|
|
- $enTime = base64_encode(http_request('http://10.10.10.63/sm4_en.php', 'POST', ['data' => $this->_time]));
|
|
|
|
|
|
+ $enTime = base64_encode(http_request('http://sm4.jinjianghc.com/encode.php', 'POST', ['data' => $this->_time]));
|
|
// $enTime = base64_encode(openssl_encrypt($this->_time, "SM4", self::KEY, 0, self::IV));
|
|
// $enTime = base64_encode(openssl_encrypt($this->_time, "SM4", self::KEY, 0, self::IV));
|
|
$header = [
|
|
$header = [
|
|
'Content-Type: application/json',
|
|
'Content-Type: application/json',
|