Skip to content

openssl_encrypt instead of mcrypt_decrypt #8063

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

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions session/proxy_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ and decrypt the session as required::
public function read($id)
{
$data = parent::read($id);

return mcrypt_decrypt(\MCRYPT_3DES, $this->key, $data);
return openssl_decrypt($data, "DES-ECB", $this->key);
}

public function write($id, $data)
{
$data = mcrypt_encrypt(\MCRYPT_3DES, $this->key, $data);
$data = openssl_encrypt($data, "DES-ECB", $this->key);

return parent::write($id, $data);
}
Expand Down