原来代码: public function encrypt($data) { if (openssl_public_encrypt(base64_encode($data), $encrypted, $this->pubkey)) $data = base64_encode($encrypted); else throw new Exception('Unable to encrypt data. Perhaps it is bigger than the key size?'); return…