cloudyr / travisci

Travis-CI API Client Package
10 stars 1 forks source link

Add function to encrypt environment variable keypair #3

Open leeper opened 8 years ago

leeper commented 8 years ago

Some notes:

# need a function here to do encryption and, optionally, add encrypted env var to .travis.yml
#x <- get_encryption_key("cloudyr/travisci")$key
#x <- readLines(textConnection(x))
#k <- PKI.load.key(base64decode(paste0(x[-c(1,length(x)-1)],collapse="\n")))
#base64encode(PKI.encrypt(charToRaw("a=b"), k))

How travis does this:

leeper commented 8 years ago

Actually, Hadley already does this here. I can import from there or copy the code.