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;
    }