def cryptographic_hash(data: (bytes or str)) ->str:
    """
    Creates a cryptographic hash of the given bytes
    :param data: data to hash
    :return: hash
    """
    if isinstance(data, str):
        data = data.encode()
    import hashlib
    hash = hashlib.sha512(data).hexdigest()
    return hash
