import hashlib


def checksum(data):
    """
    Compute the checksum of arbitrary binary input.

    Args:
        data (bytes): data as bytes

    Returns:
        bytes: checksum of the data
    """
    chksum = hashlib.new('sha512_256')
    chksum.update(data)
    return chksum.digest()