PHP Class Flexihash\Hasher\Md5Hasher

Author: Paul Annesley
Inheritance: implements Flexihash\Hasher\HasherInterface
Show file Open project: pda/flexihash Class Usage Examples

Public Methods

Method Description
hash ( string $string ) : integer {@inheritDoc}

Method Details

hash() public method

8 hexits = 32bit, which also allows us to forego having to check whether it's over PHP_INT_MAX. The substring is converted to an int since hex strings sometimes get treated as ints if all digits are ints and this results in unexpected sorting order.
Author: Dom Morgan ([email protected])
public hash ( string $string ) : integer
$string string
return integer