PHP Class CryptSession, TeamPass

Author: Enrico Zimuel ([email protected])
Afficher le fichier Open project: nilsteampassnet/TeamPass

Protected Properties

Свойство Type Description
$_algo # Encryption algorithm
$_auth # Key for HMAC authentication
$_ivSize # Size of the IV vector for encryption
$_key # Key for encryption/decryption
$_keyName # Cookie variable name of the encryption + auth key
$_name # Session name (optional)
$_path # Path of the session file

Méthodes publiques

Méthode Description
__construct ( ) Constructor
close ( ) # Close the session
destroy ( $id ) # Destoroy the session
gc ( $max ) # Garbage Collector
open ( string $save_path, string $session_name ) : boolean Open the session
read ( $id ) # Read and decrypt the session
write ( $id, $data ) # Encrypt and write the session

Méthodes protégées

Méthode Description
_randomKey ( $length = 32 ) # fallback to mcrypt_create_iv

Method Details

__construct() public méthode

Constructor
public __construct ( )

_randomKey() protected méthode

# fallback to mcrypt_create_iv
protected _randomKey ( $length = 32 )

close() public méthode

# Close the session
public close ( )

destroy() public méthode

# Destoroy the session
public destroy ( $id )

gc() public méthode

# Garbage Collector
public gc ( $max )

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 and decrypt the session
public read ( $id )

write() public méthode

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

Property Details

$_algo protected_oe property

# Encryption algorithm
protected $_algo

$_auth protected_oe property

# Key for HMAC authentication
protected $_auth

$_ivSize protected_oe property

# Size of the IV vector for encryption
protected $_ivSize

$_key protected_oe property

# Key for encryption/decryption
protected $_key

$_keyName protected_oe property

# Cookie variable name of the encryption + auth key
protected $_keyName

$_name protected_oe property

# Session name (optional)
protected $_name

$_path protected_oe property

# Path of the session file
protected $_path