Learn R Programming

b64 (version 0.1.3)

alphabet: Standard base64 alphabets

Description

Create an alphabet from a set of standard base64 alphabets, or use your own.

Usage

alphabet(which = "standard")

new_alphabet(chars)

Value

an object of class alphabet

Arguments

which

default "standard". Which base64 alphabet to use. See details for other values.

chars

a character scalar contains 64 unique characters.

Details

  • "bcrypt": bcrypt alphabet

  • "bin_hex": alphabet used in BinHex 4.0 files

  • "crypt": crypt(3) alphabet (with . and / as the first two characters)

  • "imap_mutf7": alphabet used in IMAP-modified UTF-7 (with + and ,)

  • "standard": standard alphabet (with + and /) specified in RFC 4648

  • "url_safe": URL-safe alphabet (with - and _) specified in RFC 4648

See base64 crate from where these definitions come.

Examples

Run this code
alphabet("standard")
alphabet("bcrypt")
alphabet("bin_hex")
alphabet("crypt")
alphabet("imap_mutf7")
alphabet("url_safe")

new_alphabet("qwertyuiop[]asdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890")

Run the code above in your browser using DataLab