base64
Encode or Decode a String Using Base64

Description

Encodes or decodes a character string or raw vector to or from Base64 encoding.

Usage

base64encode(object, newlines=FALSE)
base64decode(encoded)

Arguments

object a character string or raw vector containing the content to encode.
newlines a logical value. If TRUE, encoded content is wrapped with a new line character after 76 characters in a line. The default is FALSE.
encoded a character string containing the content to decode.
Value
base64encodereturns a character string containing the encoded version of object.
base64decodereturns a raw vector containing the decoded version of encoded.
References
RFC 2045, Section 6.8, https://tools.ietf.org/html/rfc2045#section-6.8
Examples
original <- readLines(system.file(package="terrUtils", "DESCRIPTION"))
encoded <- base64encode(original)
decoded <- rawToChar(base64decode(encoded))
Package terrUtils version 6.1.1-7
Package Index