$encrypter = new Illuminate\Encryption\Encrypter('qianzhudecangshu'); $session_filename = $encrypter->decrypt($_COOKIE['cangshu']); var_dump($session_filename);exit;
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
$b = Crypt::decrypt($_COOKIE['cangshu']); dump($b); $a = Crypt::encrypt('96c65a2077a21ad8e960ba1078641f90e2d93aa1'); dump($a); $c = Crypt::decrypt($a); dump($c);