sFire PHP Framework

Encrypted session driver

sFire\Session\Driver\Encrypted is an driver for sFire\Session\Session and will encrypt all the data server side for extra protection. It will use the AES-256-CBC method and SHA256 algorithm to encrypt the session.

Note: OpenSSL should be installed for this driver to work properly.

In this section we will handle:

  • Setting the session driver
  • Usagesession

Setting the session driver

To set-up the session driver, you need to inject the driver into a new instance of sFire\Session\Session. You can do so by injecting the driver into the constructor, or by calling the setDriver method.

Constructor
use sFire\Session\Session;

$session = new Session('Encrypted');
Set driver
use sFire\Session\Session;

$session = new Session();
$session -> setDriver('Encrypted');

Usage

For the documentation about the usage of this driver, you can view the sFire\Session\Session.