import hashlib


def check_hash(fpath, inhash):
    """ Verify hash """

    try:
        data = open(fpath, 'rb').read()
        
        fhash = hashlib.md5(data).hexdigest()
        if fhash == inhash:
            print('Found =>',fpath)
            return fpath

    except Exception as e:
        # print('Error processing filepath=>',fpath,'=>',e)
        pass