colly_wyx
2018-05-18 50a53f7db63c5729b0ddbc93367117cf35ccf03c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
 * PhalApi_Crypt_RSA_MultiPub2Pri 超长RSA加密
 * 
 * RSA - 公钥加密,私钥解密 - 超长字符串的应对方案
 *
 * @package     PhalApi\Crypt\RSA
 * @license     http://www.phalapi.net/license GPL 协议
 * @link        http://www.phalapi.net/
 * @author      dogstar <chanzonghuang@gmail.com> 2015-03-15
 */
 
class PhalApi_Crypt_RSA_MultiPub2Pri extends PhalApi_Crypt_RSA_MultiBase {
 
    protected $pub2pri;
 
    public function __construct() {
        $this->pub2pri = new PhalApi_Crypt_RSA_Pub2Pri();
 
        parent::__construct();
    }
 
    protected function doEncrypt($toCryptPie, $pubkey) {
        return $this->pub2pri->encrypt($toCryptPie, $pubkey);
    }
 
    protected function doDecrypt($encryptPie, $prikey) {
        return $this->pub2pri->decrypt($encryptPie, $prikey);
    }
}