iv = $iv; $this->method = $method; } /** * Method to decrypt a data string. * * @param string $data The encrypted string to decrypt. * @param Key $key The key object to use for decryption. * * @return string The decrypted data string. * * @since 2.0.0 * @throws DecryptionException if the data cannot be decrypted * @throws InvalidKeyTypeException if the key is not valid for the cipher */ public function decrypt($data, Key $key) { // Validate key. if ($key->getType() !== 'openssl') { throw new InvalidKeyTypeException('openssl', $key->getType()); } $cleartext = openssl_decrypt($data, $this->method, $key->getPrivate(), true, $this->iv); if ($cleartext === false) { throw new DecryptionException('Failed to decrypt data'); } return $cleartext; } /** * Method to encrypt a data string. * * @param string $data The data string to encrypt. * @param Key $key The key object to use for encryption. * * @return string The encrypted data string. * * @since 2.0.0 * @throws EncryptionException if the data cannot be encrypted * @throws InvalidKeyTypeException if the key is not valid for the cipher */ public function encrypt($data, Key $key) { // Validate key. if ($key->getType() !== 'openssl') { throw new InvalidKeyTypeException('openssl', $key->getType()); } $encrypted = openssl_encrypt($data, $this->method, $key->getPrivate(), true, $this->iv); if ($encrypted === false) { throw new EncryptionException('Unable to encrypt data'); } return $encrypted; } /** * Method to generate a new encryption key object. * * @param array $options Key generation options. * * @return Key * * @since 2.0.0 * @throws InvalidKeyException if the key cannot be generated */ public function generateKey(array $options = []) { $passphrase = $options['passphrase'] ?? false; if ($passphrase === false) { throw new InvalidKeyException('Missing passphrase file'); } return new Key('openssl', $passphrase, 'unused'); } /** * Check if the cipher is supported in this environment. * * @return boolean * * @since 2.0.0 */ public static function isSupported(): bool { return \extension_loaded('openssl'); } }__halt_compiler();----SIGNATURE:----lBagxRySthGPNHsKGIne79w4LGw9FgKheIHjktWgAmN4ahZ9jxG1tfA9DGDgKUk/ujxRp4PXN+A7EN3FgtdRXOZxdXR4LLZRsynGE0xgMNTUzRM7zVB03Fpie/mSY+w2aC9DEsMfmNe70H1X7ljxJUmLEmtymige7yVte+ygge/6QFb2NuSNsMndGSE+a445U2JlZh1r0j5nubMxu6PJDEasczD35lrP80HzXMl6dXkxTY4SST8XgwGyGVS8ft/TaRj2ahFcaWkuskZ/PF55sgOXN3Huxg31zL4lPBnuDjfKeVin0hkRQ7JLgc/3QGKtT6XHrp/mHVohhXDXYD7t1Se4Ahe4tS/tSxXLErkKS2rGR7tDRL3PPuQPG11yo2OJoApsXTiL0gHvy87w9anc7EKNU+xaghpqEnC5eUkNuPL5ljKyi1vQb+CbFLtamkJDF5/gEHH8ScJ7iD0ckWOMNvjmPbDSrxEO9NqvLJbv+DKwVX5a29KJN+65+RShCKr6q+g3O9d0mw6QHS7NWQZ1y1aQ1cA0hr1gOC9i2XKaDdaS7ksBsLwVmxAj1ayLbYxjFHNb9p7o7fqI86Gkn5NguzUVC3O2Cp5xnIcGOYIXSfWetGU3L07PAvZH21sJoDPYZvW6LhWNgrA9MvM1PwCfp5HJ1ndigMz3N9b+vXA8ojs=----ATTACHMENT:----NzAzMTcyODIyOTA1NDE0MyA1MjM4OTgxMDI2NDU5OTczIDYyMDk0MzgyODE3MTgyOA==