Skip to content

Commit

Permalink
Merge pull request #1 from mamantoha/add-base-26-and-52
Browse files Browse the repository at this point in the history
add Base26 and Base52
  • Loading branch information
wout authored Jul 11, 2024
2 parents 2ce2b43 + d435c80 commit 43f662a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ Base | Alphabet
2 | `01`
8 | `01234567`
11 | `0123456789a`
32 | `0123456789ABCDEFGHJKMNPQRSTVWXYZ`
26 | `ABCDEFGHIJKLMNOPQRSTUVWXYZ`
26 | `abcdefghijklmnopqrstuvwxyz` (lowercase)
32 | `ybndrfg8ejkmcpqxot1uwisza345h769` (z-base-32)
36 | `0123456789abcdefghijklmnopqrstuvwxyz`
45 | `0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`
52 | `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`
58 | `123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz` (bitcoin)
58 | `123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ` (flickr)
58 | `rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz` (ripple)
Expand Down
7 changes: 7 additions & 0 deletions src/base_x/alphabets.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ end
base11: {
default: "0123456789a",
},
base26: {
default: "ABCDEFGHJKMNPQRSTVWXYZ",
lowercase: "abcdefghijklmnopqrstuvwxyz",
},
base32: {
default: "0123456789ABCDEFGHJKMNPQRSTVWXYZ",
z_base: "ybndrfg8ejkmcpqxot1uwisza345h769",
Expand All @@ -21,6 +25,9 @@ end
base45: {
default: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",
},
base52: {
default: "ABCDEFGHJKMNPQRSTVWXYZabcdefghijklmnopqrstuvwxyz",
},
base58: {
default: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",
flickr: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
Expand Down

0 comments on commit 43f662a

Please sign in to comment.