确保在 config/app.php中,cipher被设置为适当的密码,就像上面两个一样,密钥指向 .env文件 APP_KEY变量。我的应用程序有 AES-256-CBC密码集,所以我给它32个字符的关键
like APP_KEY=ABCDEF123ERD456EABCDEF123ERD456E and everything worked just fine after that.
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',