class Security

Class Security.

Constants

PASSWORD_SECURE_REGEX

PASSWORD_CRACK_DICT

Methods

static  string
getRandomBytes( int $length = 100, bool|false $raw = false, Closure $filter = null)

No description

static  string
getRandomHash( string $algorithm = 'sha512', int $entropy = 1000000, bool|false $raw = false)

No description

static  bool
isSecurePassword( string $password, string $username = '', bool|false $throwException = false)

No description

static  string
getRandomPassword( int $length = 12)

No description

Details

at line line 39
static string getRandomBytes( int $length = 100, bool|false $raw = false, Closure $filter = null)

Parameters

int $length
bool|false $raw
Closure $filter

Return Value

string

at line line 64
static string getRandomHash( string $algorithm = 'sha512', int $entropy = 1000000, bool|false $raw = false)

Parameters

string $algorithm
int $entropy
bool|false $raw

Return Value

string

at line line 84
static bool isSecurePassword( string $password, string $username = '', bool|false $throwException = false)

Parameters

string $password
string $username
bool|false $throwException

Return Value

bool

Exceptions

RuntimeException

at line line 109
static string getRandomPassword( int $length = 12)

Parameters

int $length

Return Value

string