Welcome Guest, Not a member yet? Register   Sign In
How to set encryption key in config
#1

After reading the "Encryption Service" docs I cannot see a way to set the key as required e.g. using hex2bin();

In CI3 the config was just a variable in php file so I simply used:

PHP Code:
$key hex2bin('[32 bytes string]'

However you can't do this in the .env file or in the Encryption config file as you cant set the "public $key = '';" property to the result of a function.

Surely this defeats the object of having $key in the config?

I would like to set the key once, application wide so am I missing something here?

Many thanks,
Ben
Reply
#2

Am I missing something here? anybody help?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB