encrypt_cfg_file()encrypts the configuration file using the encryption key.decrypt_cfg_file()decrypts the configuration file using the encryption key.
Usage
encrypt_cfg_file(
cfg_file = Sys.getenv("R_CONFIG_FILE", "inst/config/config.yml"),
key = "NOCLOCKS_ENCRYPTION_KEY",
overwrite = FALSE,
...
)
decrypt_cfg_file(
cfg_file = Sys.getenv("R_CONFIG_FILE", "inst/config/config.yml"),
cfg_file_encrypted = .get_encrypted_cfg_file(cfg_file),
key = "NOCLOCKS_ENCRYPTION_KEY"
)Arguments
- cfg_file
Path to the configuration file. Defaults to the
R_CONFIG_FILEenvironment variable orinst/config/config.yml.- key
The name of the environment variable that contains the encryption key. Defaults to
NOCLOCKS_ENCRYPTION_KEY.- overwrite
Logical. Overwrite the existing encrypted file. Defaults to
FALSE. Used inencrypt_cfg_file()only.- ...
Additional arguments passed to other functions.
- cfg_file_encrypted
Path to the encrypted configuration file. Defaults to the
cfg_filewith the extension.encrypted.yml. (Used indecrypt_cfg_file()only).
Value
encrypt_cfg_file()returns invisible0.decrypt_cfg_file()returns invisibleconfig::get().
Details
The encrypt_cfg_file() function encrypts the configuration file using the encryption key.
The decrypt_cfg_file() function decrypts the configuration file using the encryption key.