/** * 生成签名结果 * @param $para_sort 已排序要签名的数组 * return 签名结果字符串 */ function buildRequestMysign($para_sort) { $prestr = llpayCore::createLinkstring($para_sort); $prestr = stripslashes($prestr); switch (strtoupper(trim($this->llpay_config['sign_type']))) { case "MD5": $mysign = llpayMd5::md5Sign($prestr, $this->llpay_config['key']); break; case "RSA": $mysign = llpayRsa::RsaSign($prestr, $this->llpay_config['RSA_PRIVATE_KEY']); break; default: $mysign = ""; } return $mysign; }
public function Rsaverify($res) { $sign = $res->sign; unset($res->sign); $res = llpayCore::paraFilter2($res); $res = llpayCore::argSort($res); foreach ($res as $key => $val) { $str[] = $key . '=' . $val; } $str = join('&', $str); return llpayRsa::Rsaverify($str, $sign); }