PHP Class PHPSecureSession\SecureHandler

Inheritance: extends SessionHandle\SessionHandler
Afficher le fichier Open project: ezimuel/php-secure-session

Protected Properties

Свойство Type Description
$key string Encryption and authentication key

Méthodes publiques

Méthode Description
__construct ( ) Constructor
open ( string $save_path, string $session_name ) : boolean Open the session
read ( string $id ) Read from session and decrypt
write ( string $id, string $data ) Encrypt the data and write into the session

Méthodes protégées

Méthode Description
decrypt ( string $data, string $key ) : string Authenticate and decrypt
encrypt ( string $data, string $key ) : string Encrypt and authenticate
getKey ( string $name ) : string Get the encryption and authentication keys from cookie
hash_equals ( string $expected, string $actual ) : boolean Hash equals function for PHP 5.5+

Method Details

__construct() public méthode

Constructor
public __construct ( )

decrypt() protected méthode

Authenticate and decrypt
protected decrypt ( string $data, string $key ) : string
$data string
$key string
Résultat string

encrypt() protected méthode

Encrypt and authenticate
protected encrypt ( string $data, string $key ) : string
$data string
$key string
Résultat string

getKey() protected méthode

Get the encryption and authentication keys from cookie
protected getKey ( string $name ) : string
$name string
Résultat string

hash_equals() protected méthode

Hash equals function for PHP 5.5+
protected hash_equals ( string $expected, string $actual ) : boolean
$expected string
$actual string
Résultat boolean

open() public méthode

Open the session
public open ( string $save_path, string $session_name ) : boolean
$save_path string
$session_name string
Résultat boolean

read() public méthode

Read from session and decrypt
public read ( string $id )
$id string

write() public méthode

Encrypt the data and write into the session
public write ( string $id, string $data )
$id string
$data string

Property Details

$key protected_oe property

Encryption and authentication key
protected string $key
Résultat string