AbstractHasher
in package
AbstractYes
Pop Crypt abstract hasher
Tags
Table of Contents
Methods
- create() : static
- Create hasher object with options
- createHash() : string
- Create hashed value
- getAlgorithms() : array<string|int, mixed>
- Get available hashing algorithms
- getInfo() : array<string|int, mixed>
- Get info from hashed value
- make() : string
- Make hashed value (based on the hasher class)
- needsRehash() : bool
- Determine if the hashed value needs to be re-hashed
- requiresRehash() : bool
- Determine if the hashed value requires re-hashing (based on the hasher class)
- setOptions() : static
- Set hasher options
- verify() : bool
- Verify hash
Methods
create()
Create hasher object with options
public
static create([array<string|int, mixed> $options = [] ]) : static
Parameters
- $options : array<string|int, mixed> = []
Return values
staticcreateHash()
Create hashed value
public
createHash(string $value, string|int|null $algorithm[, array<string|int, mixed> $options = [] ]) : string
Parameters
- $value : string
- $algorithm : string|int|null
- $options : array<string|int, mixed> = []
Return values
stringgetAlgorithms()
Get available hashing algorithms
public
getAlgorithms() : array<string|int, mixed>
Return values
array<string|int, mixed>getInfo()
Get info from hashed value
public
getInfo(string $hashedValue) : array<string|int, mixed>
Parameters
- $hashedValue : string
Return values
array<string|int, mixed>make()
Make hashed value (based on the hasher class)
public
abstract make(string $value) : string
Parameters
- $value : string
Return values
stringneedsRehash()
Determine if the hashed value needs to be re-hashed
public
needsRehash(string $hashedValue, string|int|null $algorithm[, array<string|int, mixed> $options = [] ]) : bool
Parameters
- $hashedValue : string
- $algorithm : string|int|null
- $options : array<string|int, mixed> = []
Return values
boolrequiresRehash()
Determine if the hashed value requires re-hashing (based on the hasher class)
public
abstract requiresRehash(string $hashedValue) : bool
Parameters
- $hashedValue : string
Return values
boolsetOptions()
Set hasher options
public
abstract setOptions(array<string|int, mixed> $options) : static
Parameters
- $options : array<string|int, mixed>
Return values
staticverify()
Verify hash
public
verify(string $value, string $hashedValue) : bool
Parameters
- $value : string
- $hashedValue : string