MyNixOS website logo
Description

Encrypt Html Reports Using 'Libsodium'.

Create encrypted html files that are fully self contained and do not require any additional software. Using the package you can encrypt arbitrary html files and also directly create encrypted 'rmarkdown' html reports.

lifecycle CRANstatus R buildstatus

Password protected html markdown documents

Self-encrypt html markdown reports using libsodium. The package lets you password protect markdown html documents and share them with others securely. The code needed to decrypt the file is bundled into the exported html file, which makes the resulting file fully self contained.

Use at your own risk. Feedback and bug reports very welcome!

Installation

install.packages("encryptedRmd")
remotes::install_github("dirkschumacher/encryptedRmd")

Functions

Encrypt html files

library(encryptedRmd)
encrypt_html_file("devel/example/test.html", output_path = "docs/test.encrypted.html")
#> The key to your file is: f5c8c13752cf4e8cc59b59e9f96279ceb6836fc8ce957e55e232724dd80c318f
#> Your file has been encrypted and saved at docs/test.encrypted.html

You can take a look at the exported file here and use the key printed above to decrypt it.

Encrypted rmarkdown html format

---
title: "test"
output: encryptedRmd::encrypted_html_document
---

See here for an example. After knitting, the document is encrypted with a random key and the file is stored in the same directory together with the key.

Inspiration

Inspired and based on the work by @derhuerst on self encrypting html pages.

License

MIT

Development

In devel/r-encrypted-html-template the code to generate the javascript file is contained. In order to update the template, you have to run the following:

  • In devel/r-encrypted-html-template run npm run build. This creates a new version of the template and copies it to devel/html-template.js. It also creates a file called JSLICENSES.txt that contains all licenses of used node packages.
  • In devel run combine.R. This generates the file report template and copies it to inst/html-template.html. This template is then used within the R package to generate encrypted html files.
Metadata

Version

0.2.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows