Elgg  Version 1.11
Public Member Functions | List of all members
Elgg\Database\SiteSecret Class Reference

Public Member Functions

 init ()
 Initialise the site secret (32 bytes: "z" to indicate format + 186-bit key in Base64 URL). More...
 
 get ($raw=false)
 Returns the site secret. More...
 
 getStrength ()
 Get the strength of the site secret. More...
 

Detailed Description

Definition at line 22 of file SiteSecret.php.

Member Function Documentation

Elgg\Database\SiteSecret::get (   $raw = false)

Returns the site secret.

Used to generate difficult to guess hashes for sessions and action tokens.

Parameters
bool$rawIf true, a binary key will be returned
Returns
string Site secret. private

Definition at line 54 of file SiteSecret.php.

Elgg\Database\SiteSecret::getStrength ( )

Get the strength of the site secret.

If "weak" or "moderate" is returned, this assumes we're running on the same system that created the key.

Returns
string "strong", "moderate", or "weak" private

Definition at line 88 of file SiteSecret.php.

Elgg\Database\SiteSecret::init ( )

Initialise the site secret (32 bytes: "z" to indicate format + 186-bit key in Base64 URL).

Used during installation and saves as a datalist.

Note: Old secrets were hex encoded.

Returns
mixed The site secret hash or false private

Definition at line 34 of file SiteSecret.php.


The documentation for this class was generated from the following file: