Framework: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

Created on 21 Feb 2018  路  6Comments  路  Source: laravel/framework

Description:

Encrypter->__construct('', 'AES-256-CBC')
in EncryptionServiceProvider.php (line 27)

app.php had key value 'base64:**' and 'cipher' => 'AES-256-CBC'.
But error message had key is empty.
How to fix it?
image
Any one help me.

Steps To Reproduce:

Most helpful comment

Same issue here.

$crypt = new Encrypter(env('APP_KEY'), config('app.cipher'));
dd($crypt->encrypt('test'));

If i dd key and cipher they seems to be Ok. I regenerate and used a new key but same error.

php artisan key:generate --show

All 6 comments

Hi there,

Welcome to Laravel and we are glad to have you as part of the community.

Unfortunately this GitHub area is not a support area for general application issues. This is only for issues/bugs with the framework code itself.

Can I suggest closing your issue ticket here? Instead try asking your question on one of the many great community support areas that will likely give you a better answer more quickly:

  • Laravel Slack (https://larachat.co/)
  • Laravel.io Forum (https://laravel.io/forum)
  • Laracasts Forum (https://laracasts.com/discuss)
  • StackOverflow (http://stackoverflow.com/questions/tagged/laravel)

Thanks in advance.

Most likely you are not setting APP_KEY correctly, so triple check .env, app.php and also bust config cache using php artisan config:clear.

Sorry, i am newbie in github. Any way thanks for your advise

Same issue here.

$crypt = new Encrypter(env('APP_KEY'), config('app.cipher'));
dd($crypt->encrypt('test'));

If i dd key and cipher they seems to be Ok. I regenerate and used a new key but same error.

php artisan key:generate --show

the same issue. php artizan key:generate is ok, but error still show.

php artisan key:generate
php artisan config:clear

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YannPl picture YannPl  路  3Comments

gabriellimo picture gabriellimo  路  3Comments

ghost picture ghost  路  3Comments

lzp819739483 picture lzp819739483  路  3Comments

shopblocks picture shopblocks  路  3Comments