from hashlib import sha3_512


def sha512(obj: bytes) -> bytes:
    """
    hash any bytes with sha3-512

    :param obj: bytes object
    :return: the hash
    """
    h = sha3_512()
    h.update(obj)
    return h.digest()