Register functions to work with encrypt/decryptSource:
The name of the package with the function to support (as a scalar character). If your function has no package (e.g., a function you are working on outside of a package, use "" as the name).
The name of the function to support.
The name of the argument in the target function that refers to the file that should be encrypted or decrypted. This is the value you would pass through to
Optional (and should be rare) argument used to work around functions that pass all their arguments through to a second function as dots. This is how
read.csvworks. If needed this function is a length-2 character vector in the form "package", "name" with the actual function that is used. But this should be very rare!
If your package uses cyphr, it might be useful to add this as
# The saveRDS function is already supported. But if we wanted to # support it we could look at the arguments for the function: args(saveRDS) #> function (object, file = "", ascii = FALSE, version = NULL, compress = TRUE, #> refhook = NULL) #> NULL # The 'file' argument is the one that refers to the filename, so # we'd write: cyphr::rewrite_register("base", "saveRDS", "file") # It's non-API but you can see what is supported in the package by # looking at ls(cyphr:::db) #>  "base::load" "base::readLines" "base::readRDS" #>  "base::save" "base::saveRDS" "base::writeLines" #>  "readxl::read_excel" "readxl::read_xls" "readxl::read_xlsx" #>  "utils::read.csv" "utils::read.csv2" "utils::read.delim" #>  "utils::read.delim2" "utils::read.table" "utils::write.csv" #>  "utils::write.csv2" "utils::write.table" "writexl::write_xlsx"