Create an alphabet from a set of standard base64 alphabets, or use your own.
alphabet(which = "standard")
new_alphabet(chars)
an object of class alphabet
"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.
alphabet("standard")
#> <alphabet>
#> ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
alphabet("bcrypt")
#> <alphabet>
#> ./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
alphabet("bin_hex")
#> <alphabet>
#> !"#$%&'()*+,-0123456789@ABCDEFGHIJKLMNPQRSTUVXYZ[`abcdehijklmpqr
alphabet("crypt")
#> <alphabet>
#> ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
alphabet("imap_mutf7")
#> <alphabet>
#> ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,
alphabet("url_safe")
#> <alphabet>
#> ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
new_alphabet("qwertyuiop[]asdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890")
#> <alphabet>
#> qwertyuiop[]asdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890