dirkschumacher / encryptedrmd Goto Github PK
View Code? Open in Web Editor NEW๐ Password protected markdown html reports in R using libsodium
License: Other
๐ Password protected markdown html reports in R using libsodium
License: Other
Hi, great package! Is there a way to add an option after entering the key, so it opens the html to the current browser page rather than downloading the html file?
Not sure, why the whole project is classified as html ...
htmlvault now contains the encryption part of the package, so {encryptedRmd} can focus on the rmd part.
Hi,
Thank you for your package.
I just tried it and I got an error:
R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[R.app GUI 1.76 (7976) x86_64-apple-darwin17.0]
> library(encryptedRmd)
> encrypt_html_file(
+ path = "/Users/xxx/Library/Mobile Documents/com~apple~CloudDocs/xxx/xxx/xxx/RMD/DDD.html",
+ output_path = paste0(path, ".enc.html"),
+ key = sodium::random(32L),
+ message_key = TRUE,
+ write_key_file = TRUE,
+ output_template_path = system.file("html-template.html", package = "encryptedRmd"))
Error: segfault from C stack overflow
Any clues if it is related to the new R 4.1.0 version? I am using a Mac mini Intel, 11.3.1 macOS. The file to be encrypted is about 10 MB.
Best, RN.
I'm able to encrypt an HTML file using encryptedRmd:
library(encryptedRmd)
path = '//R_Scripts/test.html'
encrypt_html_file(
path,
output_path = paste0(path, ".enc.html")
)
The encryption works, and I can access the new encrypted HTML. However, none of the ggplots show up in the encrypted version. Tables with data do show up. The test.html document has ggplots that appear perfectly.
Thanks!
Prepare for release:
devtools::build_readme()
usethis::use_cran_comments()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
cran-comments.md
Submit to CRAN:
usethis::use_version('minor')
devtools::submit_cran()
Wait for CRAN...
usethis::use_news_md()
usethis::use_github_release()
usethis::use_dev_version()
I forgot to add them
Prepare for release:
devtools::build_readme()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version()
Loving the simplicity of this! However, it is not rendering Plotly interactive graphs, which I assume has to do with some way it renders javascript. Any ideas?
In most cases .Rmd
is self including, so if you insert an image, it will use data URI scheme. That means everything is inside one .html
file, so an encrypting/decrypting process with encryptedRmd
goes well.
There are also possibility to have relative paths, so an encrypting/decrypting process with encryptedRmd
goes well, but files with relative paths are not included in it.
Here is an example.
I used the version 0.2.09
Is it possible to run encrypt_html()
function with a folder?
Is there a way to encrypt files with a known key and not a randomly generated one?
With a JS pdf viewer like Mozilla's pdf.js that would be possible.
This would then allow human entered passwords that are not perfectly random.
However the node packages does not support that at the moment
It would be great if another pair of eyes could look at the security of the package. In particular the encryption.
Relevant lines are here (only 3: key, nonce and encrypt):
encryptedRmd/R/encrypted_html_document.R
Lines 13 to 22 in 8365a7d
For decryption, the JS code is in devel.
However IMHO encryption is the most critical part. The JS code is only used for decryption purposes.
Hi,
When I run encrypt_html_file
with the file path to the html doc I want to protect, R immediately crashes. I've tried with the CRAN version and GitHub Master. My html file contains a leaflet map (leaflet
package) which has some interactive features - i.e. you can click on a an area of the map and a popup appears. If I remove the map from the html doc it encrypts fine. Any workarounds available?
Thanks
Hi, this is a very useful package!
When I use it with a htmlwidget created with the visNetwork package the widget is not displayed in the browser when decrypted. Short example below.
---
title: "test_enrcrypytedRmd"
output: encryptedRmd::encrypted_html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r results='asis'}
library(visNetwork)
nodes <- data.frame(id = 1:3)
edges <- data.frame(from = c(1,2), to = c(1,3))
visNetwork(nodes, edges)
```
Could it be possible to specify a custom decryption page? This would enable people to provide:
Superb package, I'm really looking forward to using it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.