Skip to content

Commit

Permalink
Keep backward compatibility with custom ciphers (#38556)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianPop authored Aug 26, 2021
1 parent 7134356 commit 93bacdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Encryption/Encrypter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 93bacdc

Please sign in to comment.