Skip to content

Commit 745e808

Browse files
Merge pull request #132 from Zireael-N/bcrypt_alphabet
Add a bcrypt alphabet
2 parents 5e41403 + 79d6182 commit 745e808

File tree

3 files changed

+349
-0
lines changed

3 files changed

+349
-0
lines changed

examples/make_tables.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ fn main() {
4242
print_encode_table(&crypt_alphabet, "CRYPT_ENCODE", 0);
4343
print_decode_table(&crypt_alphabet, "CRYPT_DECODE", 0);
4444

45+
// ./
46+
let bcrypt_alphabet: Vec<u8> = (b'.'..(b'/' + 1))
47+
// A-Z
48+
.chain(b'A'..(b'Z' + 1))
49+
// a-z
50+
.chain(b'a'..(b'z' + 1))
51+
// 0-9
52+
.chain(b'0'..(b'9' + 1))
53+
.collect();
54+
print_encode_table(&bcrypt_alphabet, "BCRYPT_ENCODE", 0);
55+
print_decode_table(&bcrypt_alphabet, "BCRYPT_DECODE", 0);
56+
4557
// A-Z
4658
let imap_alphabet: Vec<u8> = (0x41..0x5B)
4759
// a-z

src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ pub enum CharacterSet {
119119
///
120120
/// Not standardized, but folk wisdom on the net asserts that this alphabet is what crypt uses.
121121
Crypt,
122+
/// The bcrypt character set (uses `./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`).
123+
Bcrypt,
122124
/// The character set used in IMAP-modified UTF-7 (uses `+` and `,`).
123125
///
124126
/// See [RFC 3501](https://tools.ietf.org/html/rfc3501#section-5.1.3)
@@ -131,6 +133,7 @@ impl CharacterSet {
131133
CharacterSet::Standard => tables::STANDARD_ENCODE,
132134
CharacterSet::UrlSafe => tables::URL_SAFE_ENCODE,
133135
CharacterSet::Crypt => tables::CRYPT_ENCODE,
136+
CharacterSet::Bcrypt => tables::BCRYPT_ENCODE,
134137
CharacterSet::ImapMutf7 => tables::IMAP_MUTF7_ENCODE,
135138
}
136139
}
@@ -140,6 +143,7 @@ impl CharacterSet {
140143
CharacterSet::Standard => tables::STANDARD_DECODE,
141144
CharacterSet::UrlSafe => tables::URL_SAFE_DECODE,
142145
CharacterSet::Crypt => tables::CRYPT_DECODE,
146+
CharacterSet::Bcrypt => tables::BCRYPT_DECODE,
143147
CharacterSet::ImapMutf7 => tables::IMAP_MUTF7_DECODE,
144148
}
145149
}
@@ -218,6 +222,13 @@ pub const CRYPT: Config = Config {
218222
decode_allow_trailing_bits: false,
219223
};
220224

225+
/// Bcrypt character set
226+
pub const BCRYPT: Config = Config {
227+
char_set: CharacterSet::Bcrypt,
228+
pad: false,
229+
decode_allow_trailing_bits: false,
230+
};
231+
221232
/// IMAP modified UTF-7 requirements
222233
pub const IMAP_MUTF7: Config = Config {
223234
char_set: CharacterSet::ImapMutf7,

src/tables.rs

Lines changed: 326 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,332 @@ pub const CRYPT_DECODE: &[u8; 256] = &[
978978
INVALID_VALUE, // input 255 (0xFF)
979979
];
980980
#[rustfmt::skip]
981+
pub const BCRYPT_ENCODE: &[u8; 64] = &[
982+
46, // input 0 (0x0) => '.' (0x2E)
983+
47, // input 1 (0x1) => '/' (0x2F)
984+
65, // input 2 (0x2) => 'A' (0x41)
985+
66, // input 3 (0x3) => 'B' (0x42)
986+
67, // input 4 (0x4) => 'C' (0x43)
987+
68, // input 5 (0x5) => 'D' (0x44)
988+
69, // input 6 (0x6) => 'E' (0x45)
989+
70, // input 7 (0x7) => 'F' (0x46)
990+
71, // input 8 (0x8) => 'G' (0x47)
991+
72, // input 9 (0x9) => 'H' (0x48)
992+
73, // input 10 (0xA) => 'I' (0x49)
993+
74, // input 11 (0xB) => 'J' (0x4A)
994+
75, // input 12 (0xC) => 'K' (0x4B)
995+
76, // input 13 (0xD) => 'L' (0x4C)
996+
77, // input 14 (0xE) => 'M' (0x4D)
997+
78, // input 15 (0xF) => 'N' (0x4E)
998+
79, // input 16 (0x10) => 'O' (0x4F)
999+
80, // input 17 (0x11) => 'P' (0x50)
1000+
81, // input 18 (0x12) => 'Q' (0x51)
1001+
82, // input 19 (0x13) => 'R' (0x52)
1002+
83, // input 20 (0x14) => 'S' (0x53)
1003+
84, // input 21 (0x15) => 'T' (0x54)
1004+
85, // input 22 (0x16) => 'U' (0x55)
1005+
86, // input 23 (0x17) => 'V' (0x56)
1006+
87, // input 24 (0x18) => 'W' (0x57)
1007+
88, // input 25 (0x19) => 'X' (0x58)
1008+
89, // input 26 (0x1A) => 'Y' (0x59)
1009+
90, // input 27 (0x1B) => 'Z' (0x5A)
1010+
97, // input 28 (0x1C) => 'a' (0x61)
1011+
98, // input 29 (0x1D) => 'b' (0x62)
1012+
99, // input 30 (0x1E) => 'c' (0x63)
1013+
100, // input 31 (0x1F) => 'd' (0x64)
1014+
101, // input 32 (0x20) => 'e' (0x65)
1015+
102, // input 33 (0x21) => 'f' (0x66)
1016+
103, // input 34 (0x22) => 'g' (0x67)
1017+
104, // input 35 (0x23) => 'h' (0x68)
1018+
105, // input 36 (0x24) => 'i' (0x69)
1019+
106, // input 37 (0x25) => 'j' (0x6A)
1020+
107, // input 38 (0x26) => 'k' (0x6B)
1021+
108, // input 39 (0x27) => 'l' (0x6C)
1022+
109, // input 40 (0x28) => 'm' (0x6D)
1023+
110, // input 41 (0x29) => 'n' (0x6E)
1024+
111, // input 42 (0x2A) => 'o' (0x6F)
1025+
112, // input 43 (0x2B) => 'p' (0x70)
1026+
113, // input 44 (0x2C) => 'q' (0x71)
1027+
114, // input 45 (0x2D) => 'r' (0x72)
1028+
115, // input 46 (0x2E) => 's' (0x73)
1029+
116, // input 47 (0x2F) => 't' (0x74)
1030+
117, // input 48 (0x30) => 'u' (0x75)
1031+
118, // input 49 (0x31) => 'v' (0x76)
1032+
119, // input 50 (0x32) => 'w' (0x77)
1033+
120, // input 51 (0x33) => 'x' (0x78)
1034+
121, // input 52 (0x34) => 'y' (0x79)
1035+
122, // input 53 (0x35) => 'z' (0x7A)
1036+
48, // input 54 (0x36) => '0' (0x30)
1037+
49, // input 55 (0x37) => '1' (0x31)
1038+
50, // input 56 (0x38) => '2' (0x32)
1039+
51, // input 57 (0x39) => '3' (0x33)
1040+
52, // input 58 (0x3A) => '4' (0x34)
1041+
53, // input 59 (0x3B) => '5' (0x35)
1042+
54, // input 60 (0x3C) => '6' (0x36)
1043+
55, // input 61 (0x3D) => '7' (0x37)
1044+
56, // input 62 (0x3E) => '8' (0x38)
1045+
57, // input 63 (0x3F) => '9' (0x39)
1046+
];
1047+
#[rustfmt::skip]
1048+
pub const BCRYPT_DECODE: &[u8; 256] = &[
1049+
INVALID_VALUE, // input 0 (0x0)
1050+
INVALID_VALUE, // input 1 (0x1)
1051+
INVALID_VALUE, // input 2 (0x2)
1052+
INVALID_VALUE, // input 3 (0x3)
1053+
INVALID_VALUE, // input 4 (0x4)
1054+
INVALID_VALUE, // input 5 (0x5)
1055+
INVALID_VALUE, // input 6 (0x6)
1056+
INVALID_VALUE, // input 7 (0x7)
1057+
INVALID_VALUE, // input 8 (0x8)
1058+
INVALID_VALUE, // input 9 (0x9)
1059+
INVALID_VALUE, // input 10 (0xA)
1060+
INVALID_VALUE, // input 11 (0xB)
1061+
INVALID_VALUE, // input 12 (0xC)
1062+
INVALID_VALUE, // input 13 (0xD)
1063+
INVALID_VALUE, // input 14 (0xE)
1064+
INVALID_VALUE, // input 15 (0xF)
1065+
INVALID_VALUE, // input 16 (0x10)
1066+
INVALID_VALUE, // input 17 (0x11)
1067+
INVALID_VALUE, // input 18 (0x12)
1068+
INVALID_VALUE, // input 19 (0x13)
1069+
INVALID_VALUE, // input 20 (0x14)
1070+
INVALID_VALUE, // input 21 (0x15)
1071+
INVALID_VALUE, // input 22 (0x16)
1072+
INVALID_VALUE, // input 23 (0x17)
1073+
INVALID_VALUE, // input 24 (0x18)
1074+
INVALID_VALUE, // input 25 (0x19)
1075+
INVALID_VALUE, // input 26 (0x1A)
1076+
INVALID_VALUE, // input 27 (0x1B)
1077+
INVALID_VALUE, // input 28 (0x1C)
1078+
INVALID_VALUE, // input 29 (0x1D)
1079+
INVALID_VALUE, // input 30 (0x1E)
1080+
INVALID_VALUE, // input 31 (0x1F)
1081+
INVALID_VALUE, // input 32 (0x20)
1082+
INVALID_VALUE, // input 33 (0x21)
1083+
INVALID_VALUE, // input 34 (0x22)
1084+
INVALID_VALUE, // input 35 (0x23)
1085+
INVALID_VALUE, // input 36 (0x24)
1086+
INVALID_VALUE, // input 37 (0x25)
1087+
INVALID_VALUE, // input 38 (0x26)
1088+
INVALID_VALUE, // input 39 (0x27)
1089+
INVALID_VALUE, // input 40 (0x28)
1090+
INVALID_VALUE, // input 41 (0x29)
1091+
INVALID_VALUE, // input 42 (0x2A)
1092+
INVALID_VALUE, // input 43 (0x2B)
1093+
INVALID_VALUE, // input 44 (0x2C)
1094+
INVALID_VALUE, // input 45 (0x2D)
1095+
0, // input 46 (0x2E char '.') => 0 (0x0)
1096+
1, // input 47 (0x2F char '/') => 1 (0x1)
1097+
54, // input 48 (0x30 char '0') => 54 (0x36)
1098+
55, // input 49 (0x31 char '1') => 55 (0x37)
1099+
56, // input 50 (0x32 char '2') => 56 (0x38)
1100+
57, // input 51 (0x33 char '3') => 57 (0x39)
1101+
58, // input 52 (0x34 char '4') => 58 (0x3A)
1102+
59, // input 53 (0x35 char '5') => 59 (0x3B)
1103+
60, // input 54 (0x36 char '6') => 60 (0x3C)
1104+
61, // input 55 (0x37 char '7') => 61 (0x3D)
1105+
62, // input 56 (0x38 char '8') => 62 (0x3E)
1106+
63, // input 57 (0x39 char '9') => 63 (0x3F)
1107+
INVALID_VALUE, // input 58 (0x3A)
1108+
INVALID_VALUE, // input 59 (0x3B)
1109+
INVALID_VALUE, // input 60 (0x3C)
1110+
INVALID_VALUE, // input 61 (0x3D)
1111+
INVALID_VALUE, // input 62 (0x3E)
1112+
INVALID_VALUE, // input 63 (0x3F)
1113+
INVALID_VALUE, // input 64 (0x40)
1114+
2, // input 65 (0x41 char 'A') => 2 (0x2)
1115+
3, // input 66 (0x42 char 'B') => 3 (0x3)
1116+
4, // input 67 (0x43 char 'C') => 4 (0x4)
1117+
5, // input 68 (0x44 char 'D') => 5 (0x5)
1118+
6, // input 69 (0x45 char 'E') => 6 (0x6)
1119+
7, // input 70 (0x46 char 'F') => 7 (0x7)
1120+
8, // input 71 (0x47 char 'G') => 8 (0x8)
1121+
9, // input 72 (0x48 char 'H') => 9 (0x9)
1122+
10, // input 73 (0x49 char 'I') => 10 (0xA)
1123+
11, // input 74 (0x4A char 'J') => 11 (0xB)
1124+
12, // input 75 (0x4B char 'K') => 12 (0xC)
1125+
13, // input 76 (0x4C char 'L') => 13 (0xD)
1126+
14, // input 77 (0x4D char 'M') => 14 (0xE)
1127+
15, // input 78 (0x4E char 'N') => 15 (0xF)
1128+
16, // input 79 (0x4F char 'O') => 16 (0x10)
1129+
17, // input 80 (0x50 char 'P') => 17 (0x11)
1130+
18, // input 81 (0x51 char 'Q') => 18 (0x12)
1131+
19, // input 82 (0x52 char 'R') => 19 (0x13)
1132+
20, // input 83 (0x53 char 'S') => 20 (0x14)
1133+
21, // input 84 (0x54 char 'T') => 21 (0x15)
1134+
22, // input 85 (0x55 char 'U') => 22 (0x16)
1135+
23, // input 86 (0x56 char 'V') => 23 (0x17)
1136+
24, // input 87 (0x57 char 'W') => 24 (0x18)
1137+
25, // input 88 (0x58 char 'X') => 25 (0x19)
1138+
26, // input 89 (0x59 char 'Y') => 26 (0x1A)
1139+
27, // input 90 (0x5A char 'Z') => 27 (0x1B)
1140+
INVALID_VALUE, // input 91 (0x5B)
1141+
INVALID_VALUE, // input 92 (0x5C)
1142+
INVALID_VALUE, // input 93 (0x5D)
1143+
INVALID_VALUE, // input 94 (0x5E)
1144+
INVALID_VALUE, // input 95 (0x5F)
1145+
INVALID_VALUE, // input 96 (0x60)
1146+
28, // input 97 (0x61 char 'a') => 28 (0x1C)
1147+
29, // input 98 (0x62 char 'b') => 29 (0x1D)
1148+
30, // input 99 (0x63 char 'c') => 30 (0x1E)
1149+
31, // input 100 (0x64 char 'd') => 31 (0x1F)
1150+
32, // input 101 (0x65 char 'e') => 32 (0x20)
1151+
33, // input 102 (0x66 char 'f') => 33 (0x21)
1152+
34, // input 103 (0x67 char 'g') => 34 (0x22)
1153+
35, // input 104 (0x68 char 'h') => 35 (0x23)
1154+
36, // input 105 (0x69 char 'i') => 36 (0x24)
1155+
37, // input 106 (0x6A char 'j') => 37 (0x25)
1156+
38, // input 107 (0x6B char 'k') => 38 (0x26)
1157+
39, // input 108 (0x6C char 'l') => 39 (0x27)
1158+
40, // input 109 (0x6D char 'm') => 40 (0x28)
1159+
41, // input 110 (0x6E char 'n') => 41 (0x29)
1160+
42, // input 111 (0x6F char 'o') => 42 (0x2A)
1161+
43, // input 112 (0x70 char 'p') => 43 (0x2B)
1162+
44, // input 113 (0x71 char 'q') => 44 (0x2C)
1163+
45, // input 114 (0x72 char 'r') => 45 (0x2D)
1164+
46, // input 115 (0x73 char 's') => 46 (0x2E)
1165+
47, // input 116 (0x74 char 't') => 47 (0x2F)
1166+
48, // input 117 (0x75 char 'u') => 48 (0x30)
1167+
49, // input 118 (0x76 char 'v') => 49 (0x31)
1168+
50, // input 119 (0x77 char 'w') => 50 (0x32)
1169+
51, // input 120 (0x78 char 'x') => 51 (0x33)
1170+
52, // input 121 (0x79 char 'y') => 52 (0x34)
1171+
53, // input 122 (0x7A char 'z') => 53 (0x35)
1172+
INVALID_VALUE, // input 123 (0x7B)
1173+
INVALID_VALUE, // input 124 (0x7C)
1174+
INVALID_VALUE, // input 125 (0x7D)
1175+
INVALID_VALUE, // input 126 (0x7E)
1176+
INVALID_VALUE, // input 127 (0x7F)
1177+
INVALID_VALUE, // input 128 (0x80)
1178+
INVALID_VALUE, // input 129 (0x81)
1179+
INVALID_VALUE, // input 130 (0x82)
1180+
INVALID_VALUE, // input 131 (0x83)
1181+
INVALID_VALUE, // input 132 (0x84)
1182+
INVALID_VALUE, // input 133 (0x85)
1183+
INVALID_VALUE, // input 134 (0x86)
1184+
INVALID_VALUE, // input 135 (0x87)
1185+
INVALID_VALUE, // input 136 (0x88)
1186+
INVALID_VALUE, // input 137 (0x89)
1187+
INVALID_VALUE, // input 138 (0x8A)
1188+
INVALID_VALUE, // input 139 (0x8B)
1189+
INVALID_VALUE, // input 140 (0x8C)
1190+
INVALID_VALUE, // input 141 (0x8D)
1191+
INVALID_VALUE, // input 142 (0x8E)
1192+
INVALID_VALUE, // input 143 (0x8F)
1193+
INVALID_VALUE, // input 144 (0x90)
1194+
INVALID_VALUE, // input 145 (0x91)
1195+
INVALID_VALUE, // input 146 (0x92)
1196+
INVALID_VALUE, // input 147 (0x93)
1197+
INVALID_VALUE, // input 148 (0x94)
1198+
INVALID_VALUE, // input 149 (0x95)
1199+
INVALID_VALUE, // input 150 (0x96)
1200+
INVALID_VALUE, // input 151 (0x97)
1201+
INVALID_VALUE, // input 152 (0x98)
1202+
INVALID_VALUE, // input 153 (0x99)
1203+
INVALID_VALUE, // input 154 (0x9A)
1204+
INVALID_VALUE, // input 155 (0x9B)
1205+
INVALID_VALUE, // input 156 (0x9C)
1206+
INVALID_VALUE, // input 157 (0x9D)
1207+
INVALID_VALUE, // input 158 (0x9E)
1208+
INVALID_VALUE, // input 159 (0x9F)
1209+
INVALID_VALUE, // input 160 (0xA0)
1210+
INVALID_VALUE, // input 161 (0xA1)
1211+
INVALID_VALUE, // input 162 (0xA2)
1212+
INVALID_VALUE, // input 163 (0xA3)
1213+
INVALID_VALUE, // input 164 (0xA4)
1214+
INVALID_VALUE, // input 165 (0xA5)
1215+
INVALID_VALUE, // input 166 (0xA6)
1216+
INVALID_VALUE, // input 167 (0xA7)
1217+
INVALID_VALUE, // input 168 (0xA8)
1218+
INVALID_VALUE, // input 169 (0xA9)
1219+
INVALID_VALUE, // input 170 (0xAA)
1220+
INVALID_VALUE, // input 171 (0xAB)
1221+
INVALID_VALUE, // input 172 (0xAC)
1222+
INVALID_VALUE, // input 173 (0xAD)
1223+
INVALID_VALUE, // input 174 (0xAE)
1224+
INVALID_VALUE, // input 175 (0xAF)
1225+
INVALID_VALUE, // input 176 (0xB0)
1226+
INVALID_VALUE, // input 177 (0xB1)
1227+
INVALID_VALUE, // input 178 (0xB2)
1228+
INVALID_VALUE, // input 179 (0xB3)
1229+
INVALID_VALUE, // input 180 (0xB4)
1230+
INVALID_VALUE, // input 181 (0xB5)
1231+
INVALID_VALUE, // input 182 (0xB6)
1232+
INVALID_VALUE, // input 183 (0xB7)
1233+
INVALID_VALUE, // input 184 (0xB8)
1234+
INVALID_VALUE, // input 185 (0xB9)
1235+
INVALID_VALUE, // input 186 (0xBA)
1236+
INVALID_VALUE, // input 187 (0xBB)
1237+
INVALID_VALUE, // input 188 (0xBC)
1238+
INVALID_VALUE, // input 189 (0xBD)
1239+
INVALID_VALUE, // input 190 (0xBE)
1240+
INVALID_VALUE, // input 191 (0xBF)
1241+
INVALID_VALUE, // input 192 (0xC0)
1242+
INVALID_VALUE, // input 193 (0xC1)
1243+
INVALID_VALUE, // input 194 (0xC2)
1244+
INVALID_VALUE, // input 195 (0xC3)
1245+
INVALID_VALUE, // input 196 (0xC4)
1246+
INVALID_VALUE, // input 197 (0xC5)
1247+
INVALID_VALUE, // input 198 (0xC6)
1248+
INVALID_VALUE, // input 199 (0xC7)
1249+
INVALID_VALUE, // input 200 (0xC8)
1250+
INVALID_VALUE, // input 201 (0xC9)
1251+
INVALID_VALUE, // input 202 (0xCA)
1252+
INVALID_VALUE, // input 203 (0xCB)
1253+
INVALID_VALUE, // input 204 (0xCC)
1254+
INVALID_VALUE, // input 205 (0xCD)
1255+
INVALID_VALUE, // input 206 (0xCE)
1256+
INVALID_VALUE, // input 207 (0xCF)
1257+
INVALID_VALUE, // input 208 (0xD0)
1258+
INVALID_VALUE, // input 209 (0xD1)
1259+
INVALID_VALUE, // input 210 (0xD2)
1260+
INVALID_VALUE, // input 211 (0xD3)
1261+
INVALID_VALUE, // input 212 (0xD4)
1262+
INVALID_VALUE, // input 213 (0xD5)
1263+
INVALID_VALUE, // input 214 (0xD6)
1264+
INVALID_VALUE, // input 215 (0xD7)
1265+
INVALID_VALUE, // input 216 (0xD8)
1266+
INVALID_VALUE, // input 217 (0xD9)
1267+
INVALID_VALUE, // input 218 (0xDA)
1268+
INVALID_VALUE, // input 219 (0xDB)
1269+
INVALID_VALUE, // input 220 (0xDC)
1270+
INVALID_VALUE, // input 221 (0xDD)
1271+
INVALID_VALUE, // input 222 (0xDE)
1272+
INVALID_VALUE, // input 223 (0xDF)
1273+
INVALID_VALUE, // input 224 (0xE0)
1274+
INVALID_VALUE, // input 225 (0xE1)
1275+
INVALID_VALUE, // input 226 (0xE2)
1276+
INVALID_VALUE, // input 227 (0xE3)
1277+
INVALID_VALUE, // input 228 (0xE4)
1278+
INVALID_VALUE, // input 229 (0xE5)
1279+
INVALID_VALUE, // input 230 (0xE6)
1280+
INVALID_VALUE, // input 231 (0xE7)
1281+
INVALID_VALUE, // input 232 (0xE8)
1282+
INVALID_VALUE, // input 233 (0xE9)
1283+
INVALID_VALUE, // input 234 (0xEA)
1284+
INVALID_VALUE, // input 235 (0xEB)
1285+
INVALID_VALUE, // input 236 (0xEC)
1286+
INVALID_VALUE, // input 237 (0xED)
1287+
INVALID_VALUE, // input 238 (0xEE)
1288+
INVALID_VALUE, // input 239 (0xEF)
1289+
INVALID_VALUE, // input 240 (0xF0)
1290+
INVALID_VALUE, // input 241 (0xF1)
1291+
INVALID_VALUE, // input 242 (0xF2)
1292+
INVALID_VALUE, // input 243 (0xF3)
1293+
INVALID_VALUE, // input 244 (0xF4)
1294+
INVALID_VALUE, // input 245 (0xF5)
1295+
INVALID_VALUE, // input 246 (0xF6)
1296+
INVALID_VALUE, // input 247 (0xF7)
1297+
INVALID_VALUE, // input 248 (0xF8)
1298+
INVALID_VALUE, // input 249 (0xF9)
1299+
INVALID_VALUE, // input 250 (0xFA)
1300+
INVALID_VALUE, // input 251 (0xFB)
1301+
INVALID_VALUE, // input 252 (0xFC)
1302+
INVALID_VALUE, // input 253 (0xFD)
1303+
INVALID_VALUE, // input 254 (0xFE)
1304+
INVALID_VALUE, // input 255 (0xFF)
1305+
];
1306+
#[rustfmt::skip]
9811307
pub const IMAP_MUTF7_ENCODE: &[u8; 64] = &[
9821308
65, // input 0 (0x0) => 'A' (0x41)
9831309
66, // input 1 (0x1) => 'B' (0x42)

0 commit comments

Comments
 (0)