src/Encryption/Sha512HashProvider.php
public function compareHash($data, $hash)
    {
        $salt = $this->extractSalt($hash);

        $newHash = $this->createHash($data, $salt);

        return ($newHash == $hash);
    }
public function compareHash($data, $hash)
    {
        $salt = $this->extractSalt($hash);

        $newHash = $this->createHash($data, $salt);

        return ($newHash == $hash);
    }
public function compareHash ( $ data , $ hash ) { $ salt = $ this -> extractSalt ( $ hash ) ; $ newHash = $ this -> createHash ( $ data , $ salt ) ; return ( $ newHash == $ hash ) ; }
Computes the hash of the supplied data using the salt contained within an existing hash.

If the resultant value matches the hash the hash and data are equivilant.

@param $data
@param $hash
@return bool
Computes the hash of the supplied data using the salt contained within an existing hash .