decrypt: Decrypt a File Using GPG

Description Usage Arguments Value Examples

View source: R/decrypt.R

Description

Decrypt a symmetrically encrypted file using GPG.

Usage

1
decrypt(input, output = NULL, passphrase = NULL, verbosity = 1)

Arguments

input

A character string of the file name you wish to decrypt.

output

A character string of the file name that will be created. The default is to create a file with the same name (stripped of the .gpg or .asc file extension) in the same folder.

passphrase

A character string of the passphrase used to decrypt the encrypted file. WARNING: use this to bypass the more secure option of GPG's passphrase popup box. WARNING: the passphrase may be saved in the script as cleartext, saved in the terminal history in cleartext, and/or available in the list of processes in cleartext. The default value is NULL (Insert the passphrase using GPG's secure pop-up box).

verbosity

An integer 0, 1, 2, or 3. Control GPG's terminal message information in increasing level of detail. A value of 0 passes the '--quiet' flag for a minimum amount of information. A value of 1 does not pass any flags. A value of 2 passes the '--verbose' flag. A value of 3 passes the '--verbose --verbose' flag for the most information. The default value is 1.

Value

A decrypted file.

Examples

1
2
3
4
5
6
7
8
## Not run: 
decrypt("path/to/your/file.csv.gpg")
decrypt("path/to/your/file.csv.gpg", output = "path/to/your/file.csv")
# WARNING: only use the passphrase argument if you understand why it's
# not secure.
decrypt("path/to/your/file.csv.gpg", passphrase = "your-passphrase")

## End(Not run)

rcrypt documentation built on May 2, 2019, 12:42 a.m.