PHP Class ParagonIE\Halite\Cookie

Show file Open project: paragonie/halite

Protected Properties

Property Type Description
$key EncryptionKey

Public Methods

Method Description
__construct ( EncryptionKey $key ) Cookie constructor.
__debugInfo ( ) : array Hide this from var_dump(), etc.
fetch ( string $name ) : mixed Store a value in an encrypted cookie
store ( string $name, mixed $value, integer $expire, string $path = '/', string $domain = '', boolean $secure = true, boolean $httpOnly = true ) : boolean Store a value in an encrypted cookie

Protected Methods

Method Description
getConfig ( string $stored ) : SymmetricConfig Get the configuration for this version of halite

Method Details

__construct() public method

Cookie constructor.
public __construct ( EncryptionKey $key )
$key EncryptionKey

__debugInfo() public method

Hide this from var_dump(), etc.
public __debugInfo ( ) : array
return array

fetch() public method

Store a value in an encrypted cookie
public fetch ( string $name ) : mixed
$name string
return mixed (typically an array)

getConfig() protected static method

Get the configuration for this version of halite
protected static getConfig ( string $stored ) : SymmetricConfig
$stored string A stored password hash
return SymmetricConfig

store() public method

Store a value in an encrypted cookie
public store ( string $name, mixed $value, integer $expire, string $path = '/', string $domain = '', boolean $secure = true, boolean $httpOnly = true ) : boolean
$name string
$value mixed
$expire integer (defaults to 0)
$path string (defaults to '/')
$domain string (defaults to NULL)
$secure boolean (defaults to TRUE)
$httpOnly boolean (defaults to TRUE)
return boolean

Property Details

$key protected property

protected EncryptionKey $key
return EncryptionKey