nsoApiGPG: Source apiKey

Description Usage Arguments Details Value Author(s) Examples

Description

Source apiKey list PGP encrypted R script

Usage

1
2
3
nsoApiGPG(file = system.file("apiKey.R.gpg", package = "nsoApi"),
  gpg = file.path("D:", "GPG", "gpg2.exe"), passphrase = NULL,
  shell = file.path("C:", "Windows", "System32", "cmd.exe"), keep = FALSE)

Arguments

file

path to gpg key file

gpg

path to GnuPG executable

passphrase

character password used for decryption. suggested to store as environment variable and use with Sys.getenv()

shell

if on Windows, you may need to specify the path to cmd.exe

keep

boolean set to TRUE if you want to keep the decoded file

Details

Source apiKey list PGP encrypted R script with keys for various webservices of National Statics Offices.

Value

Creates decrypted file in the package installation folder. The key file is gpg encryped. In Windows, use GPG Plugin Portable: http://portableapps.com/apps/security/gpg-plugin-portable

Author(s)

Bo Werth <bo.werth@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
nsoApiGPG(keep = TRUE)
file.apiKey <- system.file("apiKey.R", package = "nsoApi")

if (file.exists(file.apiKey)) {
  filecon <- file(file.apiKey)
  cat(paste0(readLines(con = filecon), '\n'))
  close(filecon)
}

## End(Not run)

bowerth/nsoApi documentation built on June 17, 2019, 4:55 a.m.