colly_wyx
2018-04-23 0c4b798032fd08f562570201c0ae6ba1d040cfba
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_MultiPri2Pub 超长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-14
 */
 
class PhalApi_Crypt_RSA_MultiPri2Pub extends PhalApi_Crypt_RSA_MultiBase {
 
    protected $pri2pub;
 
    public function __construct() {
        $this->pri2pub = new PhalApi_Crypt_RSA_Pri2Pub();
 
        parent::__construct();
    }
 
    protected function doEncrypt($toCryptPie, $prikey) {
        return $this->pri2pub->encrypt($toCryptPie, $prikey);
    }
 
    protected function doDecrypt($encryptPie, $prikey) {
        return $this->pri2pub->decrypt($encryptPie, $prikey);
    }
}