|
|
|
@ -57,8 +57,16 @@ class Crypt |
|
|
|
// 升序排列 |
|
|
|
ksort($data); |
|
|
|
// 转字符串 |
|
|
|
$pre_sign_str = http_build_query($data,null,'&'); |
|
|
|
// $pre_sign_str = http_build_query($data,null,'&'); |
|
|
|
// $pre_sign_str = $data . ''; |
|
|
|
// 构建排序后的字符串 |
|
|
|
$pre_sign_str = ''; |
|
|
|
foreach ($data as $key => $value) { |
|
|
|
$sortedString .= $key . '=' . $value . '&'; |
|
|
|
} |
|
|
|
|
|
|
|
// 移除末尾的多余字符 |
|
|
|
$pre_sign_str = rtrim($sortedString, '&'); |
|
|
|
echo "[pre_sign_str(jiao yi message)]: {$pre_sign_str}"; |
|
|
|
// die(); |
|
|
|
|
|
|
|
|