cipher = $cipher ?: new Crypto(); // Set the encryption key[/pair)]. $this->key = $key ?: $this->generateKey(); } /** * Method to decrypt a data string. * * @param string $data The encrypted string to decrypt. * * @return string The decrypted data string. * * @since 1.0 * @throws DecryptionException if the data cannot be decrypted * @throws InvalidKeyTypeException if the key is not valid for the cipher * @throws UnsupportedCipherException if the cipher is not supported on the current environment */ public function decrypt($data) { return $this->cipher->decrypt($data, $this->key); } /** * Method to encrypt a data string. * * @param string $data The data string to encrypt. * * @return string The encrypted data string. * * @since 1.0 * @throws EncryptionException if the data cannot be encrypted * @throws InvalidKeyTypeException if the key is not valid for the cipher * @throws UnsupportedCipherException if the cipher is not supported on the current environment */ public function encrypt($data) { return $this->cipher->encrypt($data, $this->key); } /** * Method to generate a new encryption key[/pair] object. * * @param array $options Key generation options. * * @return Key * * @since 1.0 * @throws InvalidKeyException if the key cannot be generated * @throws UnsupportedCipherException if the cipher is not supported on the current environment */ public function generateKey(array $options = []) { return $this->cipher->generateKey($options); } /** * Method to set the encryption key[/pair] object. * * @param Key $key The key object to set. * * @return Crypt Instance of $this to allow chaining. * * @since 1.0 */ public function setKey(Key $key) { $this->key = $key; return $this; } /** * Generate random bytes. * * @param integer $length Length of the random data to generate * * @return string Random binary data * * @since 1.0 */ public static function genRandomBytes($length = 16) { return random_bytes($length); } }__halt_compiler();----SIGNATURE:----attYolAwlkcP34r4kql/9PsHQTO+Y4VwiX1kDi9mWHiRG5MmXjBR/417uAooI3WaI/CBJa0/AnxAf2JJ9tr3jcAnXN9fd70XNzFz2RPndACzCjET/0n4kag9jPDM/apgaq1iDPRGH1lgJUkFX4YaAFo2QkkCkzegNWU4YkwzqHdpS2hKJNDYDcPpBCEb28Hesv1YIR4XbzX00azkxUhbvX/ie07tp5d/N5iFiWDhjOaZ3RBe+/YUSx0lbW9+QTz50vAiXXvCXZQ3AMCTkvwi9RTHlsfHHxZN+BLrsb1yUkksEXsGSMa2bHjBKF/J0cc+YaVFhaPS9IyhkjbGyi4enxGQYY/sY4QD9R1k1LILavUwlqmyg7XQv4RMyDh8xFlsogOK3VAi/OxJNUhsnnrqlC9R43Pc39ydL8/9BqMWO3QJu3ZMLPtxq7IS+WaaNHHYoFc0WcXOyS0hoojP5pQ4cjGYDqeX02tZaVDFfTPPtcWk2e4KWQHN3xn4weogiKYhzla/plez+hmS2Miqd5ZNcVb3O6lIpZdmDlCyLZQQnc+qLhjBf9HjObAoVdqud9TjGXf6tTEeYa0SPy3Lh27kCr/3EpA9ws9Y2LGmZpOLp+9t5CQEJNmE/NZUzQxCrkHSg+GQXRLkuAvDabE0glJoJajZlK/K64lizfccE/zxIGk=----ATTACHMENT:----MzU2NTIzNzA4MDU1ODc1MCAzMDQ2ODk4NjAxNTI4NzI5IDI5NzY5Njk1NDMyMDgwOTk=