import hashlib


def _hash(filepath):
    """Hash str (len=8) of file.

    Args:
        filepath (str): filepath to get hash.

    Returns:
        str: Hash
    """
    with open(filepath, 'rb') as f:
        data = f.read()
    h = hashlib.sha1(data).hexdigest()
    return h[:8]