#' Set up a package with a secure enclave.
#'
#' This creates a \code{secure/} directory, adds it to \code{.Rbuildignore},
#' and adds secure to \code{Suggests}. Use \code{\link{add_user}()} to add a
#' new user, then \code{\link{encrypt}()} to encrypt data.
#'
#' @param pkg Path to package. Defaults to working directory.
#' @export
use_secure <- function(pkg = ".") {
if (!requireNamespace("devtools", quietly = TRUE)) {
stop("Please install devtools", call. = FALSE)
}
pkg <- devtools::as.package(pkg)
secure_path <- file.path(pkg$path, "inst", "vault")
dir.create(secure_path, showWarnings = FALSE, recursive = TRUE)
devtools::use_package("secure", "Suggests", pkg = pkg)
invisible(TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.