laravel/framework — pull request #6704 by rogue780 (2014-12-18 04:17:29+00:00)
Title: Master

This PR makes changes to src/Illuminate/Session/Store.php to allow for encrypting and decrypting session data on the fly based on a setting in the config/session.php file.

If an object implementing Illuminate\Contracts\Encryption\Encrypter is passed as the 4th argument to Store::_construct() the session store will use encryption.

The SessionManager will pass this to the store if session.encrypted is true in the config. Unit tests are included.

The use case for this modification is some companies and government agencies require session data to be encrypted. Adding this setting to the session config will make Laravel a much easier choice for those developing applications for such strict security requirements.