## ----echo=F------------------------------------------------------------------- knitr::opts_chunk$set( message = FALSE, warning = FALSE, error = FALSE, tidy = FALSE, cache = FALSE ) ## ----------------------------------------------------------------------------- # HttpSite <- S7::new_class("HttpSite", parent = RemoteSite, # properties = list(url = S7::class_character)) # # S7::method(set_public_params, HttpSite) <- function(site, params) { # ## Setup: send the public context and key to the far end, which # ## keeps them. Nothing secret travels. # send_public_params(site@url, params) # invisible(site) # } # # S7::method(contribute, HttpSite) <- function(site, theta) { # ## The far side holds the public key and encrypts before replying, # ## so the wire carries encrypted values -- never a bare number. # fetch_encrypted_contribution(site@url, theta) # }