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.6] Added serialization parameters to helper functions decrypt and encrypt #25166

Merged
merged 1 commit into from
Aug 9, 2018
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
10 changes: 6 additions & 4 deletions src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,12 @@ function database_path($path = '')
* Decrypt the given value.
*
* @param string $value
* @param bool $unserialize
* @return mixed
*/
function decrypt($value)
function decrypt($value, $unserialize = true)
{
return app('encrypter')->decrypt($value);
return app('encrypter')->decrypt($value, $unserialize);
}
}

Expand Down Expand Up @@ -452,11 +453,12 @@ function elixir($file, $buildDirectory = 'build')
* Encrypt the given value.
*
* @param mixed $value
* @param bool $serialize
* @return string
*/
function encrypt($value)
function encrypt($value, $serialize = true)
{
return app('encrypter')->encrypt($value);
return app('encrypter')->encrypt($value, $serialize);
}
}

Expand Down