public function encrypt($data) { return base64_encode(RSA::rsa_encrypt($data, $this->public_key, $this->modulus, $this->key_length)); }