import hashlib


def hashcmp(file1, file2):
    """Compare two files based on sha1 hash value."""
    sha1 = hashlib.sha1()
    sha2 = hashlib.sha1()

    with open(file1, 'rb') as f:
        data = f.read()
        sha1.update(data)

    with open(file2, 'rb') as f:
        data = f.read()
        sha2.update(data)

    return sha1.hexdigest() == sha2.hexdigest()