PHP Класс Elgg\Database\SiteSecret

С версии: 1.10.0
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( ConfigTable $configTable ) Constructor
get ( boolean $raw = false ) : string Returns the site secret.
getStrength ( ) : string Get the strength of the site secret
init ( ) : mixed Initialise the site secret (32 bytes: "z" to indicate format + 186-bit key in Base64 URL).
setTestingSecret ( string $secret ) : void Set a secret to be used in testing

Описание методов

__construct() публичный Метод

Constructor
public __construct ( ConfigTable $configTable )
$configTable ConfigTable Config table

get() публичный Метод

Used to generate difficult to guess hashes for sessions and action tokens.
public get ( boolean $raw = false ) : string
$raw boolean If true, a binary key will be returned
Результат string Site secret.

getStrength() публичный Метод

If "weak" or "moderate" is returned, this assumes we're running on the same system that created the key.
public getStrength ( ) : string
Результат string "strong", "moderate", or "weak"

init() публичный Метод

Used during installation and saves as a config. Note: Old secrets were hex encoded.
public init ( ) : mixed
Результат mixed The site secret hash or false

setTestingSecret() публичный Метод

Set a secret to be used in testing
public setTestingSecret ( string $secret ) : void
$secret string Testing site secret. 32 alphanums starting with "z"
Результат void