1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
use data_encoding::Encoding;
use data_encoding_macro::new_encoding;
pub const BASE2: Encoding = new_encoding! {
symbols: "01",
};
pub const BASE8: Encoding = new_encoding! {
symbols: "01234567",
};
pub const BASE10: &str = "0123456789";
pub const BASE16_LOWER: Encoding = data_encoding::HEXLOWER_PERMISSIVE;
pub const BASE16_UPPER: Encoding = data_encoding::HEXUPPER_PERMISSIVE;
pub const BASE32_NOPAD_LOWER: Encoding = new_encoding! {
symbols: "abcdefghijklmnopqrstuvwxyz234567",
translate_from: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
translate_to: "abcdefghijklmnopqrstuvwxyz",
};
pub const BASE32_NOPAD_UPPER: Encoding = new_encoding! {
symbols: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
translate_from: "abcdefghijklmnopqrstuvwxyz",
translate_to: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
};
pub const BASE32_PAD_LOWER: Encoding = new_encoding! {
symbols: "abcdefghijklmnopqrstuvwxyz234567",
translate_from: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
translate_to: "abcdefghijklmnopqrstuvwxyz",
padding: '=',
};
pub const BASE32_PAD_UPPER: Encoding = new_encoding! {
symbols: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
translate_from: "abcdefghijklmnopqrstuvwxyz",
translate_to: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
padding: '=',
};
pub const BASE32HEX_NOPAD_LOWER: Encoding = new_encoding! {
symbols: "0123456789abcdefghijklmnopqrstuv",
translate_from: "ABCDEFGHIJKLMNOPQRSTUV",
translate_to: "abcdefghijklmnopqrstuv",
};
pub const BASE32HEX_NOPAD_UPPER: Encoding = new_encoding! {
symbols: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
translate_from: "abcdefghijklmnopqrstuv",
translate_to: "ABCDEFGHIJKLMNOPQRSTUV",
};
pub const BASE32HEX_PAD_LOWER: Encoding = new_encoding! {
symbols: "0123456789abcdefghijklmnopqrstuv",
translate_from: "ABCDEFGHIJKLMNOPQRSTUV",
translate_to: "abcdefghijklmnopqrstuv",
padding: '=',
};
pub const BASE32HEX_PAD_UPPER: Encoding = new_encoding! {
symbols: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
translate_from: "abcdefghijklmnopqrstuv",
translate_to: "ABCDEFGHIJKLMNOPQRSTUV",
padding: '=',
};
pub const BASE32Z: Encoding = new_encoding! {
symbols: "ybndrfg8ejkmcpqxot1uwisza345h769",
};
pub const BASE36_LOWER: &str = "0123456789abcdefghijklmnopqrstuvwxyz";
pub const BASE36_UPPER: &str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
pub const BASE58_FLICKR: &str = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
pub const BASE58_BITCOIN: &str = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
pub const BASE64_NOPAD: Encoding = data_encoding::BASE64_NOPAD;
pub const BASE64_PAD: Encoding = data_encoding::BASE64;
pub const BASE64URL_NOPAD: Encoding = data_encoding::BASE64URL_NOPAD;
pub const BASE64URL_PAD: Encoding = data_encoding::BASE64URL;