encode {b64}R Documentation

Encode and decode using base64

Description

Encode and decode using base64

Usage

encode(what, eng = engine())

decode(what, eng = engine())

encode_file(path, eng = engine())

decode_file(path, eng = engine())

Arguments

what

a character, raw, or blob vector

eng

a base64 engine. See engine() for details.

path

a path to a base64 encoded file.

Value

Both encode() and decode() are vectorized. They will return a character and blob vector the same length as what, respectively.

Examples

# encode hello world
encoded <- encode("Hello world")
encoded

# decode to a blob
decoded <- decode(encoded)
decoded

# convert back to a character
rawToChar(decoded[[1]])

[Package b64 version 0.1.1 Index]