import hashlib


def checksum(file_path, hash_type = hashlib.sha256, chunk_num_blocks = 128):
    """
    Compute a hash Checksum of the given File. Default Hash Method is MD5
    :param file_path: Path of the File.
    :param hash_type: Specify which Hash Algorithm to use (mdf5, sha256, sha3, etc).
    :param chunk_num_blocks:
    :return: Hexadecimal Checksum of the File.
    """
    hash_to_use = None
    hash_to_use = hash_type
    with open(file_path, "rb") as file:
        # Read and Iterate over the Data a step at a time until an Empty Line is received.
        for chunk in iter(lambda: file.read(chunk_num_blocks * hash_to_use.block_size), b""):
            hash_to_use.update(chunk)
    return hash_to_use.hexdigest()