PHP Class App\Hashing\OsuHasher

Inheritance: implements Illuminate\Contracts\Hashing\Hasher
Show file Open project: ppy/osu-web Class Usage Examples

Protected Properties

Property Type Description
$rounds integer The number of rounds to hash, as 2^n.

Public Methods

Method Description
check ( string $value, string $hashedValue, array $options = [] ) : boolean Check the given plain value against a hash.
make ( string $value, array $options = [] ) : string Hash the given value.
needsRehash ( string $hashedValue, array $options = [] ) : boolean Check if the given hash has been hashed using the given options.

Method Details

check() public method

Check the given plain value against a hash.
public check ( string $value, string $hashedValue, array $options = [] ) : boolean
$value string
$hashedValue string
$options array
return boolean

make() public method

Hash the given value.
public make ( string $value, array $options = [] ) : string
$value string
$options array
return string

needsRehash() public method

Check if the given hash has been hashed using the given options.
public needsRehash ( string $hashedValue, array $options = [] ) : boolean
$hashedValue string
$options array
return boolean

Property Details

$rounds protected property

The number of rounds to hash, as 2^n.
protected int $rounds
return integer