+ return false;
+ }
+ openssl_public_encrypt($v, $ciphertext, $pub_key);
+ return $ciphertext;
+ }
+
+ function decrypt($v)
+ {
+ $key_dir = "{$this->getKeyDirectory()}/pri.key";
+
+ if(!file_exists($key_dir)) {
+ return false;
+ }
+
+ $pri_key = file_get_contents($key_dir);
+
+ if(!$pri_key) {
+ return false;
+ }
+
+ openssl_private_decrypt($v, $plaintext, $pri_key);
+
+ return $plaintext;
+ }
+
+ function getDecryptVal()
+ {
+
+ if(empty($this->val)) {
+ return false;
+ }
+
+ if(empty($this->is_encrypt)) {
+ return $this->val;