Encode and Decode base64

Share:

Description

Wraps openssl::base64_encode to replace the deprecated implementation by Romain Francois.

Usage

1
2
3
encode(input, output = tempfile(), linebreaks = TRUE)

decode(input, output = tempfile())

Arguments

input

input file

output

output file

linebreaks

insert linebreaks to make output human readable See openssl::base64_encode

Examples

1
2
3
4
5
6
7
8
9
# encode a file
myfile <- R.home("COPYING")
tmp <- tempfile()
base64::encode(myfile, tmp)

# decode it back
orig <- tempfile()
base64::decode(tmp, orig)
readLines(orig)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.