1
This commit is contained in:
parent
b4d1574ec3
commit
b708783f2f
2
third_party/phpcommon
vendored
2
third_party/phpcommon
vendored
@ -1 +1 @@
|
||||
Subproject commit 7a9631684fdb8672d80a94dfbe9745bea2b8a556
|
||||
Subproject commit f401b4f89a47b3f4d2835a647d68ad11deac9275
|
@ -40,25 +40,8 @@ class PayController {
|
||||
return $orderid;
|
||||
}
|
||||
|
||||
private function _redPubkey()
|
||||
{
|
||||
$pem = "-----BEGIN PUBLIC KEY-----\n" .
|
||||
chunk_split(self::PUB_KEY, 64, "\n") .
|
||||
"-----END PUBLIC KEY-----\n";
|
||||
echo $pem;
|
||||
return openssl_pkey_get_public($pem);
|
||||
}
|
||||
|
||||
private function _redPrikey()
|
||||
{
|
||||
$pem = "-----BEGIN RSA PRIVATE KEY-----\n" .
|
||||
chunk_split(self::PRI_KEY, 64, "\n") .
|
||||
"-----END RSA PRIVATE KEY-----\n";
|
||||
return openssl_pkey_get_private($pem);
|
||||
}
|
||||
|
||||
private function _reaEncode($str) {
|
||||
$prikey = $this->_redPrikey();
|
||||
$prikey = phpcommon\ReadPriKey(self::PRI_KEY);
|
||||
return openssl_sign($str, $sign, $prikey, OPENSSL_ALGO_SHA1) ? base64_encode($sign) : false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user