openssl (version 0.4)

base64: Encode and decode base64

Description

Encode and decode binary data into a base64 string. Character vectors are automatically collapse into a single string.

Usage

base64_encode(bin, linebreaks = FALSE)

base64_decode(text)

Arguments

bin
Data to encode. Must be raw or character vector.
linebreaks
Insert linebreaks in the base64 message to make it more readable.
text
The base64 message to decode. Must be a string.

Examples

Run this code
input <- charToRaw("foo = bar + 5")
message <- base64_encode(input)
output <- base64_decode(message)
identical(output, input)

Run the code above in your browser using DataLab