Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5] iv initialize in encrypt(): remove magic literal #18684

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
iv initialize in encrypt(): remove magic literal
  • Loading branch information
Snawoot authored Apr 5, 2017
commit 31bd21b4cc048e23cbd897e0952cff7c91d337fa
2 changes: 1 addition & 1 deletion src/Illuminate/Encryption/Encrypter.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static function supported($key, $cipher)
*/
public function encrypt($value, $serialize = true)
{
$iv = random_bytes(16);
$iv = random_bytes(openssl_cipher_iv_length($this->cipher));

// First we will encrypt the value using OpenSSL. After this is encrypted we
// will proceed to calculating a MAC for the encrypted value so that this
Expand Down