CryptoSessionData

class OC\Session\CryptoSessionData
Class CryptoSessionData
Source:lib/private/Session/CryptoSessionData.php#42
Implements:ArrayAccess OCP\ISession

Constants

encryptedSessionName = encrypted_session_data
Source:lib/private/Session/CryptoSessionData.php#53

Properties

protected static property OC\Session\CryptoSessionData::$session
Source:lib/private/Session/CryptoSessionData.php#44
Type:\OCP\ISession
protected static property OC\Session\CryptoSessionData::$crypto
Source:lib/private/Session/CryptoSessionData.php#46
Type:\OCP\Security\ICrypto
protected static property OC\Session\CryptoSessionData::$passphrase
Source:lib/private/Session/CryptoSessionData.php#48
Type:string
protected static property OC\Session\CryptoSessionData::$sessionValues
Source:lib/private/Session/CryptoSessionData.php#50
Type:array
protected static property OC\Session\CryptoSessionData::$isModified
Source:lib/private/Session/CryptoSessionData.php#52
Type:bool

Methods

public OC\Session\CryptoSessionData::__construct($session, $crypto, $passphrase)
Source:

lib/private/Session/CryptoSessionData.php#60

Parameters:
public OC\Session\CryptoSessionData::__destruct()
Close session if class gets destructed
Source:lib/private/Session/CryptoSessionData.php#72
protected OC\Session\CryptoSessionData::initializeSession()
Source:lib/private/Session/CryptoSessionData.php#81
public OC\Session\CryptoSessionData::set($key, $value)
Set a value in the session
Source:

lib/private/Session/CryptoSessionData.php#100

Parameters:
  • $key (string)
  • $value (mixed)
public OC\Session\CryptoSessionData::get($key)
Get a value from the session
Source:

lib/private/Session/CryptoSessionData.php#111

Parameters:
  • $key (string)
Returns:

string | null Either the value or null

public OC\Session\CryptoSessionData::exists($key)
Check if a named key exists in the session
Source:

lib/private/Session/CryptoSessionData.php#125

Parameters:
  • $key (string)
Returns:

bool

public OC\Session\CryptoSessionData::remove($key)
Remove a $key/$value pair from the session
Source:

lib/private/Session/CryptoSessionData.php#134

Parameters:
  • $key (string)
public OC\Session\CryptoSessionData::clear()
Reset and recreate the session
Source:lib/private/Session/CryptoSessionData.php#143
public OC\Session\CryptoSessionData::regenerateId($deleteOldSession=true, $updateToken=false)
Wrapper around session_regenerate_id
Source:

lib/private/Session/CryptoSessionData.php#160

Parameters:
  • $deleteOldSession (bool) Whether to delete the old associated session file or not.
  • $updateToken (bool) Wheater to update the associated auth token
Returns:

void

public OC\Session\CryptoSessionData::getId()
Wrapper around session_id
Source:lib/private/Session/CryptoSessionData.php#171
Returns:string
Throws:\OCP\Session\Exceptions\SessionNotAvailableException
Since:9.1.0
public OC\Session\CryptoSessionData::close()
Close the session and release the lock, also writes all changed data in batch
Source:lib/private/Session/CryptoSessionData.php#178
public OC\Session\CryptoSessionData::offsetExists($offset)
Source:

lib/private/Session/CryptoSessionData.php#191

Parameters:
  • $offset (mixed)
Returns:

bool

public OC\Session\CryptoSessionData::offsetGet($offset)
Source:

lib/private/Session/CryptoSessionData.php#199

Parameters:
  • $offset (mixed)
Returns:

mixed

public OC\Session\CryptoSessionData::offsetSet($offset, $value)
Source:

lib/private/Session/CryptoSessionData.php#207

Parameters:
  • $offset (mixed)
  • $value (mixed)
public OC\Session\CryptoSessionData::offsetUnset($offset)
Source:

lib/private/Session/CryptoSessionData.php#214

Parameters:
  • $offset (mixed)