From cb8123708f30e55a3e4d330a0edf8d39842e3da3 Mon Sep 17 00:00:00 2001 From: Adrian Pop Date: Thu, 26 Aug 2021 16:16:02 +0300 Subject: [PATCH] Keep backward compatibility with custom ciphers --- src/Illuminate/Encryption/Encrypter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Encryption/Encrypter.php b/src/Illuminate/Encryption/Encrypter.php index f369cfbd4d08..a4351c99285d 100755 --- a/src/Illuminate/Encryption/Encrypter.php +++ b/src/Illuminate/Encryption/Encrypter.php @@ -83,7 +83,7 @@ public static function supported($key, $cipher) */ public static function generateKey($cipher) { - return random_bytes(self::$supportedCiphers[$cipher]['size']); + return random_bytes(self::$supportedCiphers[$cipher]['size'] ?? 32); } /**