Encryption library key - issues modifying config file |
@Narf - Maybe you can help on this one?
I'm working on a script that runs after installation of my project via composer's post-create-project hook. In it, I'm pulling up the Encryption library and generating a new key, then modifying the config file to set the encryption key automatically. However, when I do this, I end up with gibberish in the config file's encryption key. This is based on the latest CI3 code. The function in the install script is: Code: public function generateEncryptionKey() I'm using a 128-character key to mesh with the default AES128/CBC encryption. I believe this is the correct length, right? Second, the method from FileKit that does the replacing is: Code: public function replaceIn($file, $search, $replace) Anyone have any ideas what I'm missing?
It turns out that the Encryption library is returning a binary value instead of a string, since my system (OS X Yosemite running MAMP Pro) doesn't seem to have mcrypt installed and the openssl_random_pseudo_bytes is returning a binary value.
I've submitted an issue on GitHub so this can probably be resolved there. |
Welcome Guest, Not a member yet? Register Sign In |