Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve file encryption/decryption docs #537

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion R/secret.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#' @name secrets
#' @returns
#' * `secret_decrypt()` and `secret_encrypt()` return strings.
#' * `secret_decrypt_file()` returns a path to a temporary file;
#' `secret_encrypt_file()` encrypts the file in place.
#' * `secret_write_rds()` returns `x` invisibly; `secret_read_rds()`
#' returns the saved object.
#' * `secret_make_key()` returns a string with class `AsIs`.
Expand Down Expand Up @@ -112,7 +114,9 @@ secret_write_rds <- function(x, path, key) {
}
#' @export
#' @rdname secrets
#' @param path Path to `.rds` file
#' @param path Path to file to encrypted file to read or write. For
#' `secret_write_rds()` and `secret_read_rds()` this should be an `.rds`
#' file.
secret_read_rds <- function(path, key) {
enc <- readBin(path, "raw", file.size(path))
dec_cmp <- secret_decrypt_raw(enc, key)
Expand Down
6 changes: 5 additions & 1 deletion man/secrets.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading