As long as you use the same APP_KEY
on both (various) systems you should be able to en-/decrypt your data successfully.
if I take the unencrypted values from production, encrypt them locally with the same APP_KEY and then put them back in the prod database, will I be able to then decrypt them successfully on the production server
Yes.
You can see this, when getting the Encrypter
service, that it injects the config key / APP_KEY
here via calling the parseKey
method.
So when calling the encrypt
method it already has the application key, $this->key
, ready to be applied.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…