View source: R/encrypt_wrapper.R
rewrite_register | R Documentation |
Add information about argument rewriting so that they can be used with encrypt and decrypt.
rewrite_register(package, name, arg, fn = NULL)
package |
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). |
name |
The name of the function to support. |
arg |
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 |
fn |
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 |
If your package uses cyphr, it might be useful to add this as
an .onLoad()
hook.
# The saveRDS function is already supported. But if we wanted to # support it we could look at the arguments for the function: args(saveRDS) # 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.