laravel framework session id decryption algorithm

巴扎黑
Release: 2016-11-08 11:25:56
Original
1777 people have browsed it

$encrypter = new Illuminate\Encryption\Encrypter('qianzhudecangshu');
        $session_filename = $encrypter->decrypt($_COOKIE['cangshu']);
        var_dump($session_filename);exit;
Copy after login

The above one is a third-party library https://github.com/illuminate/encryption. The solution is actually just a package that relies on laravel’s built-in implementation, which is useless

The following one is the built-in library of laravel 4.1

laravel framework session id decryption algorithm

$b = Crypt::decrypt($_COOKIE['cangshu']);
dump($b);
$a = Crypt::encrypt('96c65a2077a21ad8e960ba1078641f90e2d93aa1');
dump($a);
$c = Crypt::decrypt($a);
dump($c);
Copy after login


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!