Skip to contents

Encrypt and password protect an HTML document.

Usage

charm(
  input,
  password,
  hint = NULL,
  output = NULL,
  style = stylize(),
  bundle = FALSE,
  minified = TRUE,
  ...
)

Arguments

input

Path to an R Markdown or HTML file.

password

Private password to unlock file. If not provided, you will be asked to supply a password by a prompt if you are working from an interactive session.

hint

Optional public password hint.

output

Override the name of the output file.

style

Object returned from stylize().

bundle

Logical. Should all of the decryption machinery and dependencies be bundled into the HTML document? Default is FALSE.

minified

Logical. Should minified versions of JavaScript dependencies be included? Default is TRUE.

...

Arguments passed on to rmarkdown::render().

Value

input, invisibly.

Note

Using bundle = TRUE only applies to bundling the decryption machinery and dependencies for the document generated by charm(). It is still the users responsibility to decide on whether input is self-contained by passing self_contained = TRUE to rmarkdown::render() using ..., or by specifying self_contained: true in the YAML header of input.

Examples

if (FALSE) {
charm("input.Rmd")

charm("input.Rmd", password = "pw1234!")
}