今天用ecshop时,发现了这个问题。
经过解码, 完美解决问题。
贴出解码代码,以供参考。
<?php // This file is protected by copyright law & provided under license. Copyright(C) 2005-2009 www.chinapay.com, All rights reserved.
// This file is protected by copyright law & provided under license. Copyright(C) 2005-2009 www.chinapay.com, All rights reserved.
define("DES_KEY", "SCUBEPGW");
define("HASH_PAD", "0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003021300906052b0e03021a05000414");
bcscale(0);
$private_key = array();
/*function hex2bin($hexdata) {
$bindata = '';
if (strlen($hexdata) % 2 == 1) {
$hexdata = '0' . $hexdata;
}
for ($i = 0; $i < strlen($hexdata); $i+=2) {
$bindata .= chr(hexdec(substr($hexdata, $i, 2)));
}
return $bindata;
}*/
function padstr($src, $len = 256, $chr = '0', $d = 'L') {
$ret = trim($src);
$padlen = $len - strlen($ret);
if ($padlen > 0) {
$pad = str_repeat($chr, $padlen);
if (strtoupper($d) == 'L') {
$ret = $pad . $ret;
} else {
$ret = $ret . $pad;
}
}
return $ret;
}
function bin2int($bindata) {
$hexdata = bin2hex($bindata);
return bchexdec($hexdata);
}
function b