import hashlib


def hasher(file):
    """Returns the sha1 hash of a file"""
    BLOCK_SIZE = 65536
    hash = hashlib.sha1()
    with open(file, 'r') as f:
        fb = f.read(BLOCK_SIZE).encode('utf-8')
        while len(fb) > 0:
            hash.update(fb)
            fb = f.read(BLOCK_SIZE).encode('utf-8')
    return hash.hexdigest()