and if so, how should the separator be like ? Should it be a carriage return ?
2 Answers
The crypt config can only take 1 key.
-
Are you sure ? Have a look at this: reddit.com/r/Magento/comments/tfdnsk/… Commented Mar 18, 2022 at 9:51
-
well if someone on reddit tells you it's possible, then why not ask him how to provide an additional key? ;) Commented Mar 18, 2022 at 10:23
-
They did. DEVELOPER That's because that's now how you do that. Is there a developer you're working with who you can consult about that/before making changes? That isn't even correct PHP syntax. The way that looks is one encryption key per line. 'crypt' => [ 'key' => 'key1 key2' ] No comma. Commented Mar 18, 2022 at 13:18
Crypt config can take only one key value (well you could add more array keys but they are not considered when magento tries to get crypt key value).
So if you want to use multiple versions of crypt key, correct syntax is this:
// correct way
'crypt' => [
'key' => 'crypt_key_one crypt_key_two crypt_key_three',
],
Reason for this is that any value that was previously encrypted with for example crypt_key_one
would still be properly decrypted by magento.
Encrypted values are prefixed with used key version, the best place to look at for understanding how it all works is: \Magento\Framework\Encryption\Encryptor