# NOT RUN {
# create a key
k <- create_kms_key()
# encrypt
tmp <- tempfile()
cat("example test", file = tmp)
(etext <- encrypt(tmp, k))
# decrypt
(dtext <- decrypt(etext, k, encode = FALSE))
if (require("base64enc")) {
rawToChar(base64enc::base64decode(dtext))
}
# cleanup
delete_kms_key(k)
# }
Run the code above in your browser using DataLab