protected function hashCheck($iv, $value, $mac)
    {
        $salt = Str::random($this->keySize);

        $mainMac = hash_hmac('sha256', $this->hash($iv, $value), $salt);

        $checkMac = hash_hmac('sha256', $mac, $salt);

        if ($mainMac === $checkMac) {
            return true;
        }

        return false;
    }
protected function hashCheck($iv, $value, $mac)
    {
        $salt = Str::random($this->keySize);

        $mainMac = hash_hmac('sha256', $this->hash($iv, $value), $salt);

        $checkMac = hash_hmac('sha256', $mac, $salt);

        if ($mainMac === $checkMac) {
            return true;
        }

        return false;
    }
protected function hashCheck ( $ iv , $ value , $ mac ) { $ salt = Str :: random ( $ this -> keySize ) ; $ mainMac = hash_hmac ( 'sha256' , $ this -> hash ( $ iv , $ value ) , $ salt ) ; $ checkMac = hash_hmac ( 'sha256' , $ mac , $ salt ) ; if ( $ mainMac === $ checkMac ) { return true ; } return false ; }
To check mac

@param $iv
@param $value
@param $mac

@return bool
To check mac