import hashlib


def file_hash(file_path):
    """Returns the SHA-1 hash of |file_path| contents."""
    chunk_size = 51200  # Read in 50 KB chunks.
    digest = hashlib.sha1()
    with open(file_path, 'rb') as file_handle:
        chunk = file_handle.read(chunk_size)
        while chunk:
            digest.update(chunk)
            chunk = file_handle.read(chunk_size)

    return digest.hexdigest()