diff --git a/app/Config/Encryption.php b/app/Config/Encryption.php index cf7da5878..39fa4703b 100644 --- a/app/Config/Encryption.php +++ b/app/Config/Encryption.php @@ -71,7 +71,7 @@ class Encryption extends BaseConfig * * Set to false for CI3 Encryption compatibility. */ - public bool $rawData = false; + public bool $rawData = true; /** * Encryption key info. @@ -79,7 +79,7 @@ class Encryption extends BaseConfig * * Set to 'encryption' for CI3 Encryption compatibility. */ - public string $encryptKeyInfo = 'encryption'; + public string $encryptKeyInfo = ''; /** * Authentication key info. @@ -87,5 +87,5 @@ class Encryption extends BaseConfig * * Set to 'authentication' for CI3 Encryption compatibility. */ - public string $authKeyInfo = 'authentication'; + public string $authKeyInfo = ''; } diff --git a/app/Controllers/Config.php b/app/Controllers/Config.php index 24b150ba1..963dbcb4d 100644 --- a/app/Controllers/Config.php +++ b/app/Controllers/Config.php @@ -54,7 +54,7 @@ class Config extends Secure_Controller $this->sale_lib = new Sale_lib(); $this->receiving_lib = new receiving_lib(); $this->tax_lib = new Tax_lib(); - + $this->attribute = model('Attribute'); $this->customer_rewards = model('Customer_rewards'); $this->dinner_table = model('Dinner_table'); @@ -279,15 +279,7 @@ class Config extends Secure_Controller if($this->_check_encryption()) //TODO: Hungarian notation { - $config = new Encryption(); - $config->driver = 'OpenSSL'; - $config->key = config('Encryption')->key; - $config->cipher = 'AES-128-CBC'; - $config->rawData = false; - $config->encryptKeyInfo = 'encryption'; - $config->authKeyInfo = 'authentication'; - - $encrypter = Services::encrypter($config, false); + $encrypter = Services::encrypter(); $data['mailchimp']['api_key'] = $encrypter->decrypt($this->config['mailchimp_api_key'] ?? ''); $data['mailchimp']['list_id'] = $encrypter->decrypt($this->config['mailchimp_list_id'] ?? '');