import hashlib


def hash_file(file_to_hash):
    """Computes a SHA-256 hash of the specified file."""
    print("Hashing " + file_to_hash + "...")
    hash_algorithm = hashlib.sha256()
    file = open(file_to_hash, 'rb')
    while True:
        contents = file.read(65536)
        if not contents:
            break
        hash_algorithm.update(contents)
    hash_str = hash_algorithm.hexdigest()
    return hash_str