-
Notifications
You must be signed in to change notification settings - Fork 1
/
crc_8_lookup_table.h
387 lines (375 loc) · 18.3 KB
/
crc_8_lookup_table.h
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
/**
* CRC GENERIC LIBRARY.
*
* Copyright (c) 2016 Zaltora (https://github.com/Zaltora)
*
* BSD Licensed as described in the file LICENSE
*/
#ifndef CRC_8_LOOKUP_TABLE_H_
#define CRC_8_LOOKUP_TABLE_H_
//The CHECK value is the result of making the checksum of the char[] = "123456789";
//List of preset value available
/*
Algorithm Check Poly Init RefIn RefOut XorOut
CRC-8 0xF4 0x07 0x00 false false 0x00
CRC-8/CDMA2000 0xDA 0x9B 0xFF false false 0x00
CRC-8/DARC 0x15 0x39 0x00 true true 0x00
CRC-8/DVB-S2 0xBC 0xD5 0x00 false false 0x00
CRC-8/EBU 0x97 0x1D 0xFF true true 0x00
CRC-8/I-CODE 0x7E 0x1D 0xFD false false 0x00
CRC-8/ITU 0xA1 0x07 0x00 false false 0x55
CRC-8/MAXIM 0xA1 0x31 0x00 true true 0x00
CRC-8/ROHC 0xD0 0x07 0xFF true true 0x00
CRC-8/WCDMA 0x25 0x9B 0x00 true true 0x00
*/
//Array name List
/*
crc_8_tab
crc_8_tab_CDMA2000
crc_8_tab_DARC
crc_8_tab_DVBS2
crc_8_tab_EBU
crc_8_tab_ICODE
crc_8_tab_ITU
crc_8_tab_MAXIM
crc_8_tab_ROHC
crc_8_tab_WCDMA
*/
/*
* poly=0x07 init=0x00 direct=true refin=false refout=false xorout=0x00 check=0xF4
*/
static const crc_8 crc_8_tab[256] = {
0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15,
0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D,
0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65,
0x48, 0x4F, 0x46, 0x41, 0x54, 0x53, 0x5A, 0x5D,
0xE0, 0xE7, 0xEE, 0xE9, 0xFC, 0xFB, 0xF2, 0xF5,
0xD8, 0xDF, 0xD6, 0xD1, 0xC4, 0xC3, 0xCA, 0xCD,
0x90, 0x97, 0x9E, 0x99, 0x8C, 0x8B, 0x82, 0x85,
0xA8, 0xAF, 0xA6, 0xA1, 0xB4, 0xB3, 0xBA, 0xBD,
0xC7, 0xC0, 0xC9, 0xCE, 0xDB, 0xDC, 0xD5, 0xD2,
0xFF, 0xF8, 0xF1, 0xF6, 0xE3, 0xE4, 0xED, 0xEA,
0xB7, 0xB0, 0xB9, 0xBE, 0xAB, 0xAC, 0xA5, 0xA2,
0x8F, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9D, 0x9A,
0x27, 0x20, 0x29, 0x2E, 0x3B, 0x3C, 0x35, 0x32,
0x1F, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0D, 0x0A,
0x57, 0x50, 0x59, 0x5E, 0x4B, 0x4C, 0x45, 0x42,
0x6F, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7D, 0x7A,
0x89, 0x8E, 0x87, 0x80, 0x95, 0x92, 0x9B, 0x9C,
0xB1, 0xB6, 0xBF, 0xB8, 0xAD, 0xAA, 0xA3, 0xA4,
0xF9, 0xFE, 0xF7, 0xF0, 0xE5, 0xE2, 0xEB, 0xEC,
0xC1, 0xC6, 0xCF, 0xC8, 0xDD, 0xDA, 0xD3, 0xD4,
0x69, 0x6E, 0x67, 0x60, 0x75, 0x72, 0x7B, 0x7C,
0x51, 0x56, 0x5F, 0x58, 0x4D, 0x4A, 0x43, 0x44,
0x19, 0x1E, 0x17, 0x10, 0x05, 0x02, 0x0B, 0x0C,
0x21, 0x26, 0x2F, 0x28, 0x3D, 0x3A, 0x33, 0x34,
0x4E, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5C, 0x5B,
0x76, 0x71, 0x78, 0x7F, 0x6A, 0x6D, 0x64, 0x63,
0x3E, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2C, 0x2B,
0x06, 0x01, 0x08, 0x0F, 0x1A, 0x1D, 0x14, 0x13,
0xAE, 0xA9, 0xA0, 0xA7, 0xB2, 0xB5, 0xBC, 0xBB,
0x96, 0x91, 0x98, 0x9F, 0x8A, 0x8D, 0x84, 0x83,
0xDE, 0xD9, 0xD0, 0xD7, 0xC2, 0xC5, 0xCC, 0xCB,
0xE6, 0xE1, 0xE8, 0xEF, 0xFA, 0xFD, 0xF4, 0xF3,
};
/*
* poly=0x9B init=0xFF direct=true refin=false refout=false xorout=0x00 check=0xDA
*/
static const crc_8 crc_8_tab_CDMA2000[256] = {
0x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 0xAA,
0x44, 0xDF, 0xE9, 0x72, 0x85, 0x1E, 0x28, 0xB3,
0xC3, 0x58, 0x6E, 0xF5, 0x02, 0x99, 0xAF, 0x34,
0xDA, 0x41, 0x77, 0xEC, 0x1B, 0x80, 0xB6, 0x2D,
0xF1, 0x6A, 0x5C, 0xC7, 0x30, 0xAB, 0x9D, 0x06,
0xE8, 0x73, 0x45, 0xDE, 0x29, 0xB2, 0x84, 0x1F,
0xA7, 0x3C, 0x0A, 0x91, 0x66, 0xFD, 0xCB, 0x50,
0xBE, 0x25, 0x13, 0x88, 0x7F, 0xE4, 0xD2, 0x49,
0x95, 0x0E, 0x38, 0xA3, 0x54, 0xCF, 0xF9, 0x62,
0x8C, 0x17, 0x21, 0xBA, 0x4D, 0xD6, 0xE0, 0x7B,
};
/*
* poly=0x39 init=0x00 direct=true refin=true refout=true xorout=0x00 check=0x15
*/
static const crc_8 crc_8_tab_DARC[256] = {
0x00, 0x72, 0xE4, 0x96, 0xF1, 0x83, 0x15, 0x67,
0xDB, 0xA9, 0x3F, 0x4D, 0x2A, 0x58, 0xCE, 0xBC,
0x8F, 0xFD, 0x6B, 0x19, 0x7E, 0x0C, 0x9A, 0xE8,
0x54, 0x26, 0xB0, 0xC2, 0xA5, 0xD7, 0x41, 0x33,
0x27, 0x55, 0xC3, 0xB1, 0xD6, 0xA4, 0x32, 0x40,
0xFC, 0x8E, 0x18, 0x6A, 0x0D, 0x7F, 0xE9, 0x9B,
0xA8, 0xDA, 0x4C, 0x3E, 0x59, 0x2B, 0xBD, 0xCF,
0x73, 0x01, 0x97, 0xE5, 0x82, 0xF0, 0x66, 0x14,
0x4E, 0x3C, 0xAA, 0xD8, 0xBF, 0xCD, 0x5B, 0x29,
0x95, 0xE7, 0x71, 0x03, 0x64, 0x16, 0x80, 0xF2,
0xC1, 0xB3, 0x25, 0x57, 0x30, 0x42, 0xD4, 0xA6,
0x1A, 0x68, 0xFE, 0x8C, 0xEB, 0x99, 0x0F, 0x7D,
0x69, 0x1B, 0x8D, 0xFF, 0x98, 0xEA, 0x7C, 0x0E,
0xB2, 0xC0, 0x56, 0x24, 0x43, 0x31, 0xA7, 0xD5,
0xE6, 0x94, 0x02, 0x70, 0x17, 0x65, 0xF3, 0x81,
0x3D, 0x4F, 0xD9, 0xAB, 0xCC, 0xBE, 0x28, 0x5A,
0x9C, 0xEE, 0x78, 0x0A, 0x6D, 0x1F, 0x89, 0xFB,
0x47, 0x35, 0xA3, 0xD1, 0xB6, 0xC4, 0x52, 0x20,
0x13, 0x61, 0xF7, 0x85, 0xE2, 0x90, 0x06, 0x74,
0xC8, 0xBA, 0x2C, 0x5E, 0x39, 0x4B, 0xDD, 0xAF,
0xBB, 0xC9, 0x5F, 0x2D, 0x4A, 0x38, 0xAE, 0xDC,
0x60, 0x12, 0x84, 0xF6, 0x91, 0xE3, 0x75, 0x07,
0x34, 0x46, 0xD0, 0xA2, 0xC5, 0xB7, 0x21, 0x53,
0xEF, 0x9D, 0x0B, 0x79, 0x1E, 0x6C, 0xFA, 0x88,
0xD2, 0xA0, 0x36, 0x44, 0x23, 0x51, 0xC7, 0xB5,
0x09, 0x7B, 0xED, 0x9F, 0xF8, 0x8A, 0x1C, 0x6E,
0x5D, 0x2F, 0xB9, 0xCB, 0xAC, 0xDE, 0x48, 0x3A,
0x86, 0xF4, 0x62, 0x10, 0x77, 0x05, 0x93, 0xE1,
0xF5, 0x87, 0x11, 0x63, 0x04, 0x76, 0xE0, 0x92,
0x2E, 0x5C, 0xCA, 0xB8, 0xDF, 0xAD, 0x3B, 0x49,
0x7A, 0x08, 0x9E, 0xEC, 0x8B, 0xF9, 0x6F, 0x1D,
0xA1, 0xD3, 0x45, 0x37, 0x50, 0x22, 0xB4, 0xC6,
};
/*
* poly=0xD5 init=0x00 direct=true refin=false refout=false xorout=0x00 check=0xBC
*/
static const crc_8 crc_8_tab_DVBS2[256] = {
0x00, 0xD5, 0x7F, 0xAA, 0xFE, 0x2B, 0x81, 0x54,
0x29, 0xFC, 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 0xA7, 0x0D, 0xD8, 0x8C, 0x59, 0xF3, 0x26,
0x5B, 0x8E, 0x24, 0xF1, 0xA5, 0x70, 0xDA, 0x0F,
0x20, 0xF5, 0x5F, 0x8A, 0xDE, 0x0B, 0xA1, 0x74,
0x09, 0xDC, 0x76, 0xA3, 0xF7, 0x22, 0x88, 0x5D,
0xD6, 0x03, 0xA9, 0x7C, 0x28, 0xFD, 0x57, 0x82,
0xFF, 0x2A, 0x80, 0x55, 0x01, 0xD4, 0x7E, 0xAB,
0x84, 0x51, 0xFB, 0x2E, 0x7A, 0xAF, 0x05, 0xD0,
0xAD, 0x78, 0xD2, 0x07, 0x53, 0x86, 0x2C, 0xF9,
};
/*
* poly=0x1D init=0xFF direct=true refin=true refout=true xorout=0x00 check=0x97
*/
static const crc_8 crc_8_tab_EBU[256] = {
0x00, 0x64, 0xC8, 0xAC, 0xE1, 0x85, 0x29, 0x4D,
0xB3, 0xD7, 0x7B, 0x1F, 0x52, 0x36, 0x9A, 0xFE,
0x17, 0x73, 0xDF, 0xBB, 0xF6, 0x92, 0x3E, 0x5A,
0xA4, 0xC0, 0x6C, 0x08, 0x45, 0x21, 0x8D, 0xE9,
0x2E, 0x4A, 0xE6, 0x82, 0xCF, 0xAB, 0x07, 0x63,
0x9D, 0xF9, 0x55, 0x31, 0x7C, 0x18, 0xB4, 0xD0,
0x39, 0x5D, 0xF1, 0x95, 0xD8, 0xBC, 0x10, 0x74,
0x8A, 0xEE, 0x42, 0x26, 0x6B, 0x0F, 0xA3, 0xC7,
0x5C, 0x38, 0x94, 0xF0, 0xBD, 0xD9, 0x75, 0x11,
0xEF, 0x8B, 0x27, 0x43, 0x0E, 0x6A, 0xC6, 0xA2,
0x4B, 0x2F, 0x83, 0xE7, 0xAA, 0xCE, 0x62, 0x06,
0xF8, 0x9C, 0x30, 0x54, 0x19, 0x7D, 0xD1, 0xB5,
0x72, 0x16, 0xBA, 0xDE, 0x93, 0xF7, 0x5B, 0x3F,
0xC1, 0xA5, 0x09, 0x6D, 0x20, 0x44, 0xE8, 0x8C,
0x65, 0x01, 0xAD, 0xC9, 0x84, 0xE0, 0x4C, 0x28,
0xD6, 0xB2, 0x1E, 0x7A, 0x37, 0x53, 0xFF, 0x9B,
0xB8, 0xDC, 0x70, 0x14, 0x59, 0x3D, 0x91, 0xF5,
0x0B, 0x6F, 0xC3, 0xA7, 0xEA, 0x8E, 0x22, 0x46,
0xAF, 0xCB, 0x67, 0x03, 0x4E, 0x2A, 0x86, 0xE2,
0x1C, 0x78, 0xD4, 0xB0, 0xFD, 0x99, 0x35, 0x51,
0x96, 0xF2, 0x5E, 0x3A, 0x77, 0x13, 0xBF, 0xDB,
0x25, 0x41, 0xED, 0x89, 0xC4, 0xA0, 0x0C, 0x68,
0x81, 0xE5, 0x49, 0x2D, 0x60, 0x04, 0xA8, 0xCC,
0x32, 0x56, 0xFA, 0x9E, 0xD3, 0xB7, 0x1B, 0x7F,
0xE4, 0x80, 0x2C, 0x48, 0x05, 0x61, 0xCD, 0xA9,
0x57, 0x33, 0x9F, 0xFB, 0xB6, 0xD2, 0x7E, 0x1A,
0xF3, 0x97, 0x3B, 0x5F, 0x12, 0x76, 0xDA, 0xBE,
0x40, 0x24, 0x88, 0xEC, 0xA1, 0xC5, 0x69, 0x0D,
0xCA, 0xAE, 0x02, 0x66, 0x2B, 0x4F, 0xE3, 0x87,
0x79, 0x1D, 0xB1, 0xD5, 0x98, 0xFC, 0x50, 0x34,
0xDD, 0xB9, 0x15, 0x71, 0x3C, 0x58, 0xF4, 0x90,
0x6E, 0x0A, 0xA6, 0xC2, 0x8F, 0xEB, 0x47, 0x23,
};
/*
* poly=0x1D init=0xFD direct=true refin=false refout=false xorout=0x00 check=0x7E
*/
static const crc_8 crc_8_tab_ICODE[256] = {
0x00, 0x1D, 0x3A, 0x27, 0x74, 0x69, 0x4E, 0x53,
0xE8, 0xF5, 0xD2, 0xCF, 0x9C, 0x81, 0xA6, 0xBB,
0xCD, 0xD0, 0xF7, 0xEA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 0xFA, 0xA9, 0xB4, 0x93, 0x8E,
0xF8, 0xE5, 0xC2, 0xDF, 0x8C, 0x91, 0xB6, 0xAB,
0x10, 0x0D, 0x2A, 0x37, 0x64, 0x79, 0x5E, 0x43,
0xB2, 0xAF, 0x88, 0x95, 0xC6, 0xDB, 0xFC, 0xE1,
0x5A, 0x47, 0x60, 0x7D, 0x2E, 0x33, 0x14, 0x09,
0x7F, 0x62, 0x45, 0x58, 0x0B, 0x16, 0x31, 0x2C,
0x97, 0x8A, 0xAD, 0xB0, 0xE3, 0xFE, 0xD9, 0xC4,
};
/*
* poly=0x07 init=0x00 direct=true refin=false refout=false xorout=0x55 check=0xA1
*/
#define crc_8_tab_ITU crc_8_tab
/*
* poly=0x31 init=0x00 direct=true refin=true refout=true xorout=0x00 check=0xA1
*/
static const crc_8 crc_8_tab_MAXIM[256] = {
0x00, 0x5E, 0xBC, 0xE2, 0x61, 0x3F, 0xDD, 0x83,
0xC2, 0x9C, 0x7E, 0x20, 0xA3, 0xFD, 0x1F, 0x41,
0x9D, 0xC3, 0x21, 0x7F, 0xFC, 0xA2, 0x40, 0x1E,
0x5F, 0x01, 0xE3, 0xBD, 0x3E, 0x60, 0x82, 0xDC,
0x23, 0x7D, 0x9F, 0xC1, 0x42, 0x1C, 0xFE, 0xA0,
0xE1, 0xBF, 0x5D, 0x03, 0x80, 0xDE, 0x3C, 0x62,
0xBE, 0xE0, 0x02, 0x5C, 0xDF, 0x81, 0x63, 0x3D,
0x7C, 0x22, 0xC0, 0x9E, 0x1D, 0x43, 0xA1, 0xFF,
0x46, 0x18, 0xFA, 0xA4, 0x27, 0x79, 0x9B, 0xC5,
0x84, 0xDA, 0x38, 0x66, 0xE5, 0xBB, 0x59, 0x07,
0xDB, 0x85, 0x67, 0x39, 0xBA, 0xE4, 0x06, 0x58,
0x19, 0x47, 0xA5, 0xFB, 0x78, 0x26, 0xC4, 0x9A,
0x65, 0x3B, 0xD9, 0x87, 0x04, 0x5A, 0xB8, 0xE6,
0xA7, 0xF9, 0x1B, 0x45, 0xC6, 0x98, 0x7A, 0x24,
0xF8, 0xA6, 0x44, 0x1A, 0x99, 0xC7, 0x25, 0x7B,
0x3A, 0x64, 0x86, 0xD8, 0x5B, 0x05, 0xE7, 0xB9,
0x8C, 0xD2, 0x30, 0x6E, 0xED, 0xB3, 0x51, 0x0F,
0x4E, 0x10, 0xF2, 0xAC, 0x2F, 0x71, 0x93, 0xCD,
0x11, 0x4F, 0xAD, 0xF3, 0x70, 0x2E, 0xCC, 0x92,
0xD3, 0x8D, 0x6F, 0x31, 0xB2, 0xEC, 0x0E, 0x50,
0xAF, 0xF1, 0x13, 0x4D, 0xCE, 0x90, 0x72, 0x2C,
0x6D, 0x33, 0xD1, 0x8F, 0x0C, 0x52, 0xB0, 0xEE,
0x32, 0x6C, 0x8E, 0xD0, 0x53, 0x0D, 0xEF, 0xB1,
0xF0, 0xAE, 0x4C, 0x12, 0x91, 0xCF, 0x2D, 0x73,
0xCA, 0x94, 0x76, 0x28, 0xAB, 0xF5, 0x17, 0x49,
0x08, 0x56, 0xB4, 0xEA, 0x69, 0x37, 0xD5, 0x8B,
0x57, 0x09, 0xEB, 0xB5, 0x36, 0x68, 0x8A, 0xD4,
0x95, 0xCB, 0x29, 0x77, 0xF4, 0xAA, 0x48, 0x16,
0xE9, 0xB7, 0x55, 0x0B, 0x88, 0xD6, 0x34, 0x6A,
0x2B, 0x75, 0x97, 0xC9, 0x4A, 0x14, 0xF6, 0xA8,
0x74, 0x2A, 0xC8, 0x96, 0x15, 0x4B, 0xA9, 0xF7,
0xB6, 0xE8, 0x0A, 0x54, 0xD7, 0x89, 0x6B, 0x35,
};
/*
* poly=0x07 init=0xFF direct=true refin=true refout=true xorout=0x00 check=0xD0
*/
static const crc_8 crc_8_tab_ROHC[256] = {
0x00, 0x91, 0xE3, 0x72, 0x07, 0x96, 0xE4, 0x75,
0x0E, 0x9F, 0xED, 0x7C, 0x09, 0x98, 0xEA, 0x7B,
0x1C, 0x8D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E, 0x0F, 0x7D, 0xEC, 0x99, 0x08, 0x7A, 0xEB,
0x8C, 0x1D, 0x6F, 0xFE, 0x8B, 0x1A, 0x68, 0xF9,
0x82, 0x13, 0x61, 0xF0, 0x85, 0x14, 0x66, 0xF7,
0xA8, 0x39, 0x4B, 0xDA, 0xAF, 0x3E, 0x4C, 0xDD,
0xA6, 0x37, 0x45, 0xD4, 0xA1, 0x30, 0x42, 0xD3,
0xB4, 0x25, 0x57, 0xC6, 0xB3, 0x22, 0x50, 0xC1,
0xBA, 0x2B, 0x59, 0xC8, 0xBD, 0x2C, 0x5E, 0xCF,
};
/*
* poly=0x9B init=0x00 direct=true refin=true refout=true xorout=0x00 check=0x25
*/
static const crc_8 crc_8_tab_WCDMA[256] = {
0x00, 0xD0, 0x13, 0xC3, 0x26, 0xF6, 0x35, 0xE5,
0x4C, 0x9C, 0x5F, 0x8F, 0x6A, 0xBA, 0x79, 0xA9,
0x98, 0x48, 0x8B, 0x5B, 0xBE, 0x6E, 0xAD, 0x7D,
0xD4, 0x04, 0xC7, 0x17, 0xF2, 0x22, 0xE1, 0x31,
0x83, 0x53, 0x90, 0x40, 0xA5, 0x75, 0xB6, 0x66,
0xCF, 0x1F, 0xDC, 0x0C, 0xE9, 0x39, 0xFA, 0x2A,
0x1B, 0xCB, 0x08, 0xD8, 0x3D, 0xED, 0x2E, 0xFE,
0x57, 0x87, 0x44, 0x94, 0x71, 0xA1, 0x62, 0xB2,
0xB5, 0x65, 0xA6, 0x76, 0x93, 0x43, 0x80, 0x50,
0xF9, 0x29, 0xEA, 0x3A, 0xDF, 0x0F, 0xCC, 0x1C,
0x2D, 0xFD, 0x3E, 0xEE, 0x0B, 0xDB, 0x18, 0xC8,
0x61, 0xB1, 0x72, 0xA2, 0x47, 0x97, 0x54, 0x84,
0x36, 0xE6, 0x25, 0xF5, 0x10, 0xC0, 0x03, 0xD3,
0x7A, 0xAA, 0x69, 0xB9, 0x5C, 0x8C, 0x4F, 0x9F,
0xAE, 0x7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