tce_functions_session.php

tce_functions_session.php source file reference

Package: com\tecnick\tcexam\shared

Tags

  • file: User-level session storage functions.\ This script uses the session_set_save_handler() function to set the user-level session storage functions which are used for storing and retrieving data associated with a session.\ The session data is stored on a local database. NOTE: This script automatically starts the user’s session.
  • author: Nicola Asuni
  • since: 2001-09-26

Functions

F_session_string_to_array()

File: tce_functions_session.php line 212

F_session_string_to_array(mixed $sd) : array<string|int, mixed>

Parameters

  • $sd : mixed: (string) input data string

Tags

  • author: Nicola Asuni
  • since: 2001-10-18

Return values

array<string|int, mixed>

getClientFingerprint()

File: tce_functions_session.php line 232

getClientFingerprint() : string

Tags

  • author: Nicola Asuni
  • since: 2010-10-04

Return values

string —

client ID

getNewSessionID()

File: tce_functions_session.php line 268

getNewSessionID() : string

Tags

  • author: Nicola Asuni
  • since: 2010-10-04

Return values

string —

PHPSESSID

getPasswordHash()

File: tce_functions_session.php line 278

getPasswordHash(mixed $password) : string

Parameters

  • $password : mixed: (string) Password to hash.

Return values

string —

password hash

checkPassword()

File: tce_functions_session.php line 290

checkPassword(mixed $password, mixed $hash) : bool

Parameters

  • $password : mixed: (string) The password to verify
  • $hash : mixed: (string) Password hash

Return values

bool

F_isRandomSecurityConfigured()

File: tce_functions_session.php line 304

F_isRandomSecurityConfigured([mixed $secret = null ]) : bool

Security-sensitive checks that rely on the secrecy of K_RANDOM_SECURITY (e.g. the result-access token that bypasses the normal authorization check) MUST fail closed when this returns false, otherwise an attacker who knows the public default can forge a valid token. The installer replaces the placeholder with a random value at install time.

Parameters

  • $secret : mixed = null

Return values

bool —

true if the seed is configured, false if it is still the shipped default.

getPlainCSRFToken()

File: tce_functions_session.php line 321

getPlainCSRFToken() : string

Return values

string

checkCSRFToken()

File: tce_functions_session.php line 333

checkCSRFToken(mixed $token) : bool

Parameters

  • $token : mixed: (string) tocken to check

Return values

bool

F_getCSRFToken()

File: tce_functions_session.php line 343

F_getCSRFToken() : string

Return values

string