From 68b11b5f6a566f030275e44a35b30feeb08cd36e Mon Sep 17 00:00:00 2001 From: Anton Maminov Date: Thu, 11 Jul 2024 11:49:39 +0300 Subject: [PATCH 1/2] add Base26 and Base52 --- README.md | 4 +++- src/base_x/alphabets.cr | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 39076e5..90bbc73 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/src/base_x/alphabets.cr b/src/base_x/alphabets.cr index fa76219..cb30645 100644 --- a/src/base_x/alphabets.cr +++ b/src/base_x/alphabets.cr @@ -11,6 +11,10 @@ end base11: { default: "0123456789a", }, + base26: { + default: "ABCDEFGHJKMNPQRSTVWXYZ", + lowercase: "abcdefghijklmnopqrstuvwxyz", + }, base32: { default: "0123456789ABCDEFGHJKMNPQRSTVWXYZ", z_base: "ybndrfg8ejkmcpqxot1uwisza345h769", @@ -21,6 +25,9 @@ end base45: { default: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", }, + base52: { + default: "ABCDEFGHJKMNPQRSTVWXYZabcdefghijklmnopqrstuvwxyz", + }, base58: { default: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", flickr: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", From d435c80245084d620ec5e0a34f737a534019db2d Mon Sep 17 00:00:00 2001 From: Anton Maminov Date: Thu, 11 Jul 2024 12:10:46 +0300 Subject: [PATCH 2/2] format code --- src/base_x/alphabets.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base_x/alphabets.cr b/src/base_x/alphabets.cr index cb30645..5bb8f4f 100644 --- a/src/base_x/alphabets.cr +++ b/src/base_x/alphabets.cr @@ -12,7 +12,7 @@ end default: "0123456789a", }, base26: { - default: "ABCDEFGHJKMNPQRSTVWXYZ", + default: "ABCDEFGHJKMNPQRSTVWXYZ", lowercase: "abcdefghijklmnopqrstuvwxyz", }, base32: {