PHP Class CryptSession, TeamPass

Author: Enrico Zimuel ([email protected])
ファイルを表示 Open project: nilsteampassnet/TeamPass

Protected Properties

Property 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

Public Methods

Method 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

Protected Methods

Method Description
_randomKey ( $length = 32 ) # fallback to mcrypt_create_iv

Method Details

__construct() public method

Constructor
public __construct ( )

_randomKey() protected method

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

close() public method

# Close the session
public close ( )

destroy() public method

# Destoroy the session
public destroy ( $id )

gc() public method

# Garbage Collector
public gc ( $max )

open() public method

Open the session
public open ( string $save_path, string $session_name ) : boolean
$save_path string
$session_name string
return boolean

read() public method

# Read and decrypt the session
public read ( $id )

write() public method

# 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