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:----obRK+pMfpKgBgNpdVGK180UgE0z3lScFV0pgibCJRfZRnMvdHHryebo/WVXMladi4HDoC7+mR4nZFNJM+NHQAk2VHRG7kXbwDv/JQ+z62MlLFu+kEw89h+YNcgprP9/WiOlxPO4EUXi0kB5lryR8XF6gjixSgmOnv1w554KE7LUIftsc6BtHkJp5NJVdYpz/C/Srf9/JTdOIHMsvTFwBKmqCAOlrL7RMrpETY+v570UD0SjwG2hSrX9wGOraa1tN2KXA0zBxREzUJAXGuWQLoZTulqEar0mTLZe73PC/wWJ8hTAgVSRshmrt+Dni7XoVTVlCPqyCpsvtuPV8uBL3SFz+JSprOiRbz8Y7ckoGzdng2Ty8vqjhJWM0FHR3lBWGyikwyAsibEr3YdXzGuwoFz0QWKssAj5vuFYJm9jTLabqS42I4IqSx24v9Zla8ZhjSRS071wGE3PNt1dMJJcCfK9oGebk4ua+XMREMX5KrY26EV/3qCTd6k35ILS8X4mVBjthr+eIN9AkpOTbKcRpxf+V7kU5LK5amKZTIB3v2dYL5uAeR0YTQB0CccVK9pGW3jZcBKUjpxVlGhNIGKgWgnhuGllZiFxqeV21AiNOquCEiq5pS/+W0R0oujL3Ex+n2cZPlBE/a1Rg/8cjQZts9C9VgkSe/2ZNb0o5elh9efE=----ATTACHMENT:----MzczODU4NDI0NjY1OTEzNiA5NzAxMzYyMTc2OTU0NTk0IDUzMTEyNTg3NDM0MzkyNjI=