Wraps openssl::base64_encode to replace the deprecated implementation by Romain Francois.
openssl::base64_encode
encode(input, output = tempfile(), linebreaks = TRUE)decode(input, output = tempfile())
decode(input, output = tempfile())
input file
output file
insert linebreaks to make output human readable See openssl::base64_encode
# encode a file myfile <- R.home("COPYING") tmp <- tempfile() base64::encode(myfile, tmp) # decode it back orig <- tempfile() base64::decode(tmp, orig) readLines(orig)
Run the code above in your browser using DataCamp Workspace