Giter Club home page Giter Club logo

encryptedrmd's Introduction

lifecycle CRAN status R build status

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.

encryptedrmd's People

Contributors

dirkschumacher avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.