setData($data); } if ( null !== $salt ) { $this->setSalt($salt); } $this->_dataEcrypted = $encrypted; } public function setData($data) { $this->_data = trim( (string) $data ); return $this; } public function setSalt($salt) { $this->_salt = (string) $salt; return $this; } /** * 获取加密字符串 * * @return string */ abstract public function encrypt(); /** * 获取解密字符串 * * @return string */ public function decrypt() { return $this->_data; } } // End ^ Native EOL ^ encoding