final class BaseCrypt (View source)

Constants

private ALGO

private COST

Methods

static string
string
static string
generateRandomPassword(int $length = 16)
string
static string
encPassword(string $password, int|null $cost = null)
string
static bool
checkHash(string $hash, string $password)
bool
static bool
needsRehash(string $hash)
bool

Details

getSalt

static string getSalt()

No description

Return Value

string

generateRandomPassword

static string generateRandomPassword(int $length = 16)

No description

Parameters

int $length

Return Value

string

encPassword

static string encPassword(string $password, int|null $cost = null)

No description

Parameters

string $password
int|null $cost

Return Value

string

checkHash

static bool checkHash(string $hash, string $password)

No description

Parameters

string $hash
string $password

Return Value

bool

needsRehash

static bool needsRehash(string $hash)

No description

Parameters

string $hash

Return Value

bool