Welcome Guest, Not a member yet? Register   Sign In
decrypt() returning incorrect result
#7

(This post was last modified: 02-19-2023, 05:44 AM by objecttothis. Edit Reason: Grammar )

(02-18-2023, 04:25 PM)kenjis Wrote: Oh, thank you for the investigation.
I got your situation.

Try:

PHP Code:
$config        = new Encryption();
$config->driver 'OpenSSL';
// Your CI3's encryption_key
$config->key            'Your Key';
$config->cipher        'AES-128-CBC'// Add this!
$config->rawData        false;
$config->encryptKeyInfo 'encryption';
$config->authKeyInfo    'authentication';

$encrypter Services::encrypter($configfalse); 

Excellent.  This works. I submitted a PR to add the field into \App\Config\Encryption.php and the documentation example. https://github.com/codeigniter4/CodeIgniter4/pull/7278
Reply


Messages In This Thread
RE: decrypt() returning incorrect result - by objecttothis - 02-19-2023, 05:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB