$encrypter = new Illuminate\Encryption\Encrypter('qianzhudecangshu'); $session_filename = $encrypter->decrypt($_COOKIE['cangshu']); var_dump($session_filename);exit;
The solution above is a third-party library https://github.com/illuminate/encryption. In fact, it is just a package that relies on laravel’s built-in implementation. It is useless
The following one is a built-in library in laravel 4.1
$b = Crypt::decrypt($_COOKIE['cangshu']); dump($b); $a = Crypt::encrypt('96c65a2077a21ad8e960ba1078641f90e2d93aa1'); dump($a); $c = Crypt::decrypt($a); dump($c);
The above introduces the laravel framework session id decryption algorithm, including laravel and session content. I hope it will be helpful to friends who are interested in PHP tutorials.