forked from ohjeongwook/dumpflash
-
Notifications
You must be signed in to change notification settings - Fork 1
/
crc32.py
558 lines (548 loc) · 27.7 KB
/
crc32.py
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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
crc32table_le=[[
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL,
0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L,
0x0edb8832L, 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L,
0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, 0x90bf1d91L,
0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L,
0x136c9856L, 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL,
0x14015c4fL, 0x63066cd9L, 0xfa0f3d63L, 0x8d080df5L,
0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, 0xa2677172L,
0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L,
0x32d86ce3L, 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L,
0x26d930acL, 0x51de003aL, 0xc8d75180L, 0xbfd06116L,
0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, 0xb8bda50fL,
0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL,
0x76dc4190L, 0x01db7106L, 0x98d220bcL, 0xefd5102aL,
0x71b18589L, 0x06b6b51fL, 0x9fbfe4a5L, 0xe8b8d433L,
0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, 0xe10e9818L,
0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL,
0x6c0695edL, 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L,
0x65b0d9c6L, 0x12b7e950L, 0x8bbeb8eaL, 0xfcb9887cL,
0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, 0xfbd44c65L,
0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL,
0x4369e96aL, 0x346ed9fcL, 0xad678846L, 0xda60b8d0L,
0x44042d73L, 0x33031de5L, 0xaa0a4c5fL, 0xdd0d7cc9L,
0x5005713cL, 0x270241aaL, 0xbe0b1010L, 0xc90c2086L,
0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L,
0x59b33d17L, 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL,
0xedb88320L, 0x9abfb3b6L, 0x03b6e20cL, 0x74b1d29aL,
0xead54739L, 0x9dd277afL, 0x04db2615L, 0x73dc1683L,
0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L,
0xf00f9344L, 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL,
0xf762575dL, 0x806567cbL, 0x196c3671L, 0x6e6b06e7L,
0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, 0x67dd4accL,
0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L,
0xd1bb67f1L, 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL,
0xd80d2bdaL, 0xaf0a1b4cL, 0x36034af6L, 0x41047a60L,
0xdf60efc3L, 0xa867df55L, 0x316e8eefL, 0x4669be79L,
0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL,
0xc5ba3bbeL, 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L,
0xc2d7ffa7L, 0xb5d0cf31L, 0x2cd99e8bL, 0x5bdeae1dL,
0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, 0x026d930aL,
0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L,
0x92d28e9bL, 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L,
0x86d3d2d4L, 0xf1d4e242L, 0x68ddb3f8L, 0x1fda836eL,
0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, 0x18b74777L,
0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L,
0xa00ae278L, 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L,
0xa7672661L, 0xd06016f7L, 0x4969474dL, 0x3e6e77dbL,
0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, 0x37d83bf0L,
0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L,
0xbad03605L, 0xcdd70693L, 0x54de5729L, 0x23d967bfL,
0xb3667a2eL, 0xc4614ab8L, 0x5d681b02L, 0x2a6f2b94L,
0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, 0x2d02ef8dL],
[
0x00000000L, 0x191b3141L, 0x32366282L, 0x2b2d53c3L,
0x646cc504L, 0x7d77f445L, 0x565aa786L, 0x4f4196c7L,
0xc8d98a08L, 0xd1c2bb49L, 0xfaefe88aL, 0xe3f4d9cbL,
0xacb54f0cL, 0xb5ae7e4dL, 0x9e832d8eL, 0x87981ccfL,
0x4ac21251L, 0x53d92310L, 0x78f470d3L, 0x61ef4192L,
0x2eaed755L, 0x37b5e614L, 0x1c98b5d7L, 0x05838496L,
0x821b9859L, 0x9b00a918L, 0xb02dfadbL, 0xa936cb9aL,
0xe6775d5dL, 0xff6c6c1cL, 0xd4413fdfL, 0xcd5a0e9eL,
0x958424a2L, 0x8c9f15e3L, 0xa7b24620L, 0xbea97761L,
0xf1e8e1a6L, 0xe8f3d0e7L, 0xc3de8324L, 0xdac5b265L,
0x5d5daeaaL, 0x44469febL, 0x6f6bcc28L, 0x7670fd69L,
0x39316baeL, 0x202a5aefL, 0x0b07092cL, 0x121c386dL,
0xdf4636f3L, 0xc65d07b2L, 0xed705471L, 0xf46b6530L,
0xbb2af3f7L, 0xa231c2b6L, 0x891c9175L, 0x9007a034L,
0x179fbcfbL, 0x0e848dbaL, 0x25a9de79L, 0x3cb2ef38L,
0x73f379ffL, 0x6ae848beL, 0x41c51b7dL, 0x58de2a3cL,
0xf0794f05L, 0xe9627e44L, 0xc24f2d87L, 0xdb541cc6L,
0x94158a01L, 0x8d0ebb40L, 0xa623e883L, 0xbf38d9c2L,
0x38a0c50dL, 0x21bbf44cL, 0x0a96a78fL, 0x138d96ceL,
0x5ccc0009L, 0x45d73148L, 0x6efa628bL, 0x77e153caL,
0xbabb5d54L, 0xa3a06c15L, 0x888d3fd6L, 0x91960e97L,
0xded79850L, 0xc7cca911L, 0xece1fad2L, 0xf5facb93L,
0x7262d75cL, 0x6b79e61dL, 0x4054b5deL, 0x594f849fL,
0x160e1258L, 0x0f152319L, 0x243870daL, 0x3d23419bL,
0x65fd6ba7L, 0x7ce65ae6L, 0x57cb0925L, 0x4ed03864L,
0x0191aea3L, 0x188a9fe2L, 0x33a7cc21L, 0x2abcfd60L,
0xad24e1afL, 0xb43fd0eeL, 0x9f12832dL, 0x8609b26cL,
0xc94824abL, 0xd05315eaL, 0xfb7e4629L, 0xe2657768L,
0x2f3f79f6L, 0x362448b7L, 0x1d091b74L, 0x04122a35L,
0x4b53bcf2L, 0x52488db3L, 0x7965de70L, 0x607eef31L,
0xe7e6f3feL, 0xfefdc2bfL, 0xd5d0917cL, 0xcccba03dL,
0x838a36faL, 0x9a9107bbL, 0xb1bc5478L, 0xa8a76539L,
0x3b83984bL, 0x2298a90aL, 0x09b5fac9L, 0x10aecb88L,
0x5fef5d4fL, 0x46f46c0eL, 0x6dd93fcdL, 0x74c20e8cL,
0xf35a1243L, 0xea412302L, 0xc16c70c1L, 0xd8774180L,
0x9736d747L, 0x8e2de606L, 0xa500b5c5L, 0xbc1b8484L,
0x71418a1aL, 0x685abb5bL, 0x4377e898L, 0x5a6cd9d9L,
0x152d4f1eL, 0x0c367e5fL, 0x271b2d9cL, 0x3e001cddL,
0xb9980012L, 0xa0833153L, 0x8bae6290L, 0x92b553d1L,
0xddf4c516L, 0xc4eff457L, 0xefc2a794L, 0xf6d996d5L,
0xae07bce9L, 0xb71c8da8L, 0x9c31de6bL, 0x852aef2aL,
0xca6b79edL, 0xd37048acL, 0xf85d1b6fL, 0xe1462a2eL,
0x66de36e1L, 0x7fc507a0L, 0x54e85463L, 0x4df36522L,
0x02b2f3e5L, 0x1ba9c2a4L, 0x30849167L, 0x299fa026L,
0xe4c5aeb8L, 0xfdde9ff9L, 0xd6f3cc3aL, 0xcfe8fd7bL,
0x80a96bbcL, 0x99b25afdL, 0xb29f093eL, 0xab84387fL,
0x2c1c24b0L, 0x350715f1L, 0x1e2a4632L, 0x07317773L,
0x4870e1b4L, 0x516bd0f5L, 0x7a468336L, 0x635db277L,
0xcbfad74eL, 0xd2e1e60fL, 0xf9ccb5ccL, 0xe0d7848dL,
0xaf96124aL, 0xb68d230bL, 0x9da070c8L, 0x84bb4189L,
0x03235d46L, 0x1a386c07L, 0x31153fc4L, 0x280e0e85L,
0x674f9842L, 0x7e54a903L, 0x5579fac0L, 0x4c62cb81L,
0x8138c51fL, 0x9823f45eL, 0xb30ea79dL, 0xaa1596dcL,
0xe554001bL, 0xfc4f315aL, 0xd7626299L, 0xce7953d8L,
0x49e14f17L, 0x50fa7e56L, 0x7bd72d95L, 0x62cc1cd4L,
0x2d8d8a13L, 0x3496bb52L, 0x1fbbe891L, 0x06a0d9d0L,
0x5e7ef3ecL, 0x4765c2adL, 0x6c48916eL, 0x7553a02fL,
0x3a1236e8L, 0x230907a9L, 0x0824546aL, 0x113f652bL,
0x96a779e4L, 0x8fbc48a5L, 0xa4911b66L, 0xbd8a2a27L,
0xf2cbbce0L, 0xebd08da1L, 0xc0fdde62L, 0xd9e6ef23L,
0x14bce1bdL, 0x0da7d0fcL, 0x268a833fL, 0x3f91b27eL,
0x70d024b9L, 0x69cb15f8L, 0x42e6463bL, 0x5bfd777aL,
0xdc656bb5L, 0xc57e5af4L, 0xee530937L, 0xf7483876L,
0xb809aeb1L, 0xa1129ff0L, 0x8a3fcc33L, 0x9324fd72L],
[
0x00000000L, 0x01c26a37L, 0x0384d46eL, 0x0246be59L,
0x0709a8dcL, 0x06cbc2ebL, 0x048d7cb2L, 0x054f1685L,
0x0e1351b8L, 0x0fd13b8fL, 0x0d9785d6L, 0x0c55efe1L,
0x091af964L, 0x08d89353L, 0x0a9e2d0aL, 0x0b5c473dL,
0x1c26a370L, 0x1de4c947L, 0x1fa2771eL, 0x1e601d29L,
0x1b2f0bacL, 0x1aed619bL, 0x18abdfc2L, 0x1969b5f5L,
0x1235f2c8L, 0x13f798ffL, 0x11b126a6L, 0x10734c91L,
0x153c5a14L, 0x14fe3023L, 0x16b88e7aL, 0x177ae44dL,
0x384d46e0L, 0x398f2cd7L, 0x3bc9928eL, 0x3a0bf8b9L,
0x3f44ee3cL, 0x3e86840bL, 0x3cc03a52L, 0x3d025065L,
0x365e1758L, 0x379c7d6fL, 0x35dac336L, 0x3418a901L,
0x3157bf84L, 0x3095d5b3L, 0x32d36beaL, 0x331101ddL,
0x246be590L, 0x25a98fa7L, 0x27ef31feL, 0x262d5bc9L,
0x23624d4cL, 0x22a0277bL, 0x20e69922L, 0x2124f315L,
0x2a78b428L, 0x2bbade1fL, 0x29fc6046L, 0x283e0a71L,
0x2d711cf4L, 0x2cb376c3L, 0x2ef5c89aL, 0x2f37a2adL,
0x709a8dc0L, 0x7158e7f7L, 0x731e59aeL, 0x72dc3399L,
0x7793251cL, 0x76514f2bL, 0x7417f172L, 0x75d59b45L,
0x7e89dc78L, 0x7f4bb64fL, 0x7d0d0816L, 0x7ccf6221L,
0x798074a4L, 0x78421e93L, 0x7a04a0caL, 0x7bc6cafdL,
0x6cbc2eb0L, 0x6d7e4487L, 0x6f38fadeL, 0x6efa90e9L,
0x6bb5866cL, 0x6a77ec5bL, 0x68315202L, 0x69f33835L,
0x62af7f08L, 0x636d153fL, 0x612bab66L, 0x60e9c151L,
0x65a6d7d4L, 0x6464bde3L, 0x662203baL, 0x67e0698dL,
0x48d7cb20L, 0x4915a117L, 0x4b531f4eL, 0x4a917579L,
0x4fde63fcL, 0x4e1c09cbL, 0x4c5ab792L, 0x4d98dda5L,
0x46c49a98L, 0x4706f0afL, 0x45404ef6L, 0x448224c1L,
0x41cd3244L, 0x400f5873L, 0x4249e62aL, 0x438b8c1dL,
0x54f16850L, 0x55330267L, 0x5775bc3eL, 0x56b7d609L,
0x53f8c08cL, 0x523aaabbL, 0x507c14e2L, 0x51be7ed5L,
0x5ae239e8L, 0x5b2053dfL, 0x5966ed86L, 0x58a487b1L,
0x5deb9134L, 0x5c29fb03L, 0x5e6f455aL, 0x5fad2f6dL,
0xe1351b80L, 0xe0f771b7L, 0xe2b1cfeeL, 0xe373a5d9L,
0xe63cb35cL, 0xe7fed96bL, 0xe5b86732L, 0xe47a0d05L,
0xef264a38L, 0xeee4200fL, 0xeca29e56L, 0xed60f461L,
0xe82fe2e4L, 0xe9ed88d3L, 0xebab368aL, 0xea695cbdL,
0xfd13b8f0L, 0xfcd1d2c7L, 0xfe976c9eL, 0xff5506a9L,
0xfa1a102cL, 0xfbd87a1bL, 0xf99ec442L, 0xf85cae75L,
0xf300e948L, 0xf2c2837fL, 0xf0843d26L, 0xf1465711L,
0xf4094194L, 0xf5cb2ba3L, 0xf78d95faL, 0xf64fffcdL,
0xd9785d60L, 0xd8ba3757L, 0xdafc890eL, 0xdb3ee339L,
0xde71f5bcL, 0xdfb39f8bL, 0xddf521d2L, 0xdc374be5L,
0xd76b0cd8L, 0xd6a966efL, 0xd4efd8b6L, 0xd52db281L,
0xd062a404L, 0xd1a0ce33L, 0xd3e6706aL, 0xd2241a5dL,
0xc55efe10L, 0xc49c9427L, 0xc6da2a7eL, 0xc7184049L,
0xc25756ccL, 0xc3953cfbL, 0xc1d382a2L, 0xc011e895L,
0xcb4dafa8L, 0xca8fc59fL, 0xc8c97bc6L, 0xc90b11f1L,
0xcc440774L, 0xcd866d43L, 0xcfc0d31aL, 0xce02b92dL,
0x91af9640L, 0x906dfc77L, 0x922b422eL, 0x93e92819L,
0x96a63e9cL, 0x976454abL, 0x9522eaf2L, 0x94e080c5L,
0x9fbcc7f8L, 0x9e7eadcfL, 0x9c381396L, 0x9dfa79a1L,
0x98b56f24L, 0x99770513L, 0x9b31bb4aL, 0x9af3d17dL,
0x8d893530L, 0x8c4b5f07L, 0x8e0de15eL, 0x8fcf8b69L,
0x8a809decL, 0x8b42f7dbL, 0x89044982L, 0x88c623b5L,
0x839a6488L, 0x82580ebfL, 0x801eb0e6L, 0x81dcdad1L,
0x8493cc54L, 0x8551a663L, 0x8717183aL, 0x86d5720dL,
0xa9e2d0a0L, 0xa820ba97L, 0xaa6604ceL, 0xaba46ef9L,
0xaeeb787cL, 0xaf29124bL, 0xad6fac12L, 0xacadc625L,
0xa7f18118L, 0xa633eb2fL, 0xa4755576L, 0xa5b73f41L,
0xa0f829c4L, 0xa13a43f3L, 0xa37cfdaaL, 0xa2be979dL,
0xb5c473d0L, 0xb40619e7L, 0xb640a7beL, 0xb782cd89L,
0xb2cddb0cL, 0xb30fb13bL, 0xb1490f62L, 0xb08b6555L,
0xbbd72268L, 0xba15485fL, 0xb853f606L, 0xb9919c31L,
0xbcde8ab4L, 0xbd1ce083L, 0xbf5a5edaL, 0xbe9834edL],
[
0x00000000L, 0xb8bc6765L, 0xaa09c88bL, 0x12b5afeeL,
0x8f629757L, 0x37def032L, 0x256b5fdcL, 0x9dd738b9L,
0xc5b428efL, 0x7d084f8aL, 0x6fbde064L, 0xd7018701L,
0x4ad6bfb8L, 0xf26ad8ddL, 0xe0df7733L, 0x58631056L,
0x5019579fL, 0xe8a530faL, 0xfa109f14L, 0x42acf871L,
0xdf7bc0c8L, 0x67c7a7adL, 0x75720843L, 0xcdce6f26L,
0x95ad7f70L, 0x2d111815L, 0x3fa4b7fbL, 0x8718d09eL,
0x1acfe827L, 0xa2738f42L, 0xb0c620acL, 0x087a47c9L,
0xa032af3eL, 0x188ec85bL, 0x0a3b67b5L, 0xb28700d0L,
0x2f503869L, 0x97ec5f0cL, 0x8559f0e2L, 0x3de59787L,
0x658687d1L, 0xdd3ae0b4L, 0xcf8f4f5aL, 0x7733283fL,
0xeae41086L, 0x525877e3L, 0x40edd80dL, 0xf851bf68L,
0xf02bf8a1L, 0x48979fc4L, 0x5a22302aL, 0xe29e574fL,
0x7f496ff6L, 0xc7f50893L, 0xd540a77dL, 0x6dfcc018L,
0x359fd04eL, 0x8d23b72bL, 0x9f9618c5L, 0x272a7fa0L,
0xbafd4719L, 0x0241207cL, 0x10f48f92L, 0xa848e8f7L,
0x9b14583dL, 0x23a83f58L, 0x311d90b6L, 0x89a1f7d3L,
0x1476cf6aL, 0xaccaa80fL, 0xbe7f07e1L, 0x06c36084L,
0x5ea070d2L, 0xe61c17b7L, 0xf4a9b859L, 0x4c15df3cL,
0xd1c2e785L, 0x697e80e0L, 0x7bcb2f0eL, 0xc377486bL,
0xcb0d0fa2L, 0x73b168c7L, 0x6104c729L, 0xd9b8a04cL,
0x446f98f5L, 0xfcd3ff90L, 0xee66507eL, 0x56da371bL,
0x0eb9274dL, 0xb6054028L, 0xa4b0efc6L, 0x1c0c88a3L,
0x81dbb01aL, 0x3967d77fL, 0x2bd27891L, 0x936e1ff4L,
0x3b26f703L, 0x839a9066L, 0x912f3f88L, 0x299358edL,
0xb4446054L, 0x0cf80731L, 0x1e4da8dfL, 0xa6f1cfbaL,
0xfe92dfecL, 0x462eb889L, 0x549b1767L, 0xec277002L,
0x71f048bbL, 0xc94c2fdeL, 0xdbf98030L, 0x6345e755L,
0x6b3fa09cL, 0xd383c7f9L, 0xc1366817L, 0x798a0f72L,
0xe45d37cbL, 0x5ce150aeL, 0x4e54ff40L, 0xf6e89825L,
0xae8b8873L, 0x1637ef16L, 0x048240f8L, 0xbc3e279dL,
0x21e91f24L, 0x99557841L, 0x8be0d7afL, 0x335cb0caL,
0xed59b63bL, 0x55e5d15eL, 0x47507eb0L, 0xffec19d5L,
0x623b216cL, 0xda874609L, 0xc832e9e7L, 0x708e8e82L,
0x28ed9ed4L, 0x9051f9b1L, 0x82e4565fL, 0x3a58313aL,
0xa78f0983L, 0x1f336ee6L, 0x0d86c108L, 0xb53aa66dL,
0xbd40e1a4L, 0x05fc86c1L, 0x1749292fL, 0xaff54e4aL,
0x322276f3L, 0x8a9e1196L, 0x982bbe78L, 0x2097d91dL,
0x78f4c94bL, 0xc048ae2eL, 0xd2fd01c0L, 0x6a4166a5L,
0xf7965e1cL, 0x4f2a3979L, 0x5d9f9697L, 0xe523f1f2L,
0x4d6b1905L, 0xf5d77e60L, 0xe762d18eL, 0x5fdeb6ebL,
0xc2098e52L, 0x7ab5e937L, 0x680046d9L, 0xd0bc21bcL,
0x88df31eaL, 0x3063568fL, 0x22d6f961L, 0x9a6a9e04L,
0x07bda6bdL, 0xbf01c1d8L, 0xadb46e36L, 0x15080953L,
0x1d724e9aL, 0xa5ce29ffL, 0xb77b8611L, 0x0fc7e174L,
0x9210d9cdL, 0x2aacbea8L, 0x38191146L, 0x80a57623L,
0xd8c66675L, 0x607a0110L, 0x72cfaefeL, 0xca73c99bL,
0x57a4f122L, 0xef189647L, 0xfdad39a9L, 0x45115eccL,
0x764dee06L, 0xcef18963L, 0xdc44268dL, 0x64f841e8L,
0xf92f7951L, 0x41931e34L, 0x5326b1daL, 0xeb9ad6bfL,
0xb3f9c6e9L, 0x0b45a18cL, 0x19f00e62L, 0xa14c6907L,
0x3c9b51beL, 0x842736dbL, 0x96929935L, 0x2e2efe50L,
0x2654b999L, 0x9ee8defcL, 0x8c5d7112L, 0x34e11677L,
0xa9362eceL, 0x118a49abL, 0x033fe645L, 0xbb838120L,
0xe3e09176L, 0x5b5cf613L, 0x49e959fdL, 0xf1553e98L,
0x6c820621L, 0xd43e6144L, 0xc68bceaaL, 0x7e37a9cfL,
0xd67f4138L, 0x6ec3265dL, 0x7c7689b3L, 0xc4caeed6L,
0x591dd66fL, 0xe1a1b10aL, 0xf3141ee4L, 0x4ba87981L,
0x13cb69d7L, 0xab770eb2L, 0xb9c2a15cL, 0x017ec639L,
0x9ca9fe80L, 0x241599e5L, 0x36a0360bL, 0x8e1c516eL,
0x866616a7L, 0x3eda71c2L, 0x2c6fde2cL, 0x94d3b949L,
0x090481f0L, 0xb1b8e695L, 0xa30d497bL, 0x1bb12e1eL,
0x43d23e48L, 0xfb6e592dL, 0xe9dbf6c3L, 0x516791a6L,
0xccb0a91fL, 0x740cce7aL, 0x66b96194L, 0xde0506f1L],
[
0x00000000L, 0x3d6029b0L, 0x7ac05360L, 0x47a07ad0L,
0xf580a6c0L, 0xc8e08f70L, 0x8f40f5a0L, 0xb220dc10L,
0x30704bc1L, 0x0d106271L, 0x4ab018a1L, 0x77d03111L,
0xc5f0ed01L, 0xf890c4b1L, 0xbf30be61L, 0x825097d1L,
0x60e09782L, 0x5d80be32L, 0x1a20c4e2L, 0x2740ed52L,
0x95603142L, 0xa80018f2L, 0xefa06222L, 0xd2c04b92L,
0x5090dc43L, 0x6df0f5f3L, 0x2a508f23L, 0x1730a693L,
0xa5107a83L, 0x98705333L, 0xdfd029e3L, 0xe2b00053L,
0xc1c12f04L, 0xfca106b4L, 0xbb017c64L, 0x866155d4L,
0x344189c4L, 0x0921a074L, 0x4e81daa4L, 0x73e1f314L,
0xf1b164c5L, 0xccd14d75L, 0x8b7137a5L, 0xb6111e15L,
0x0431c205L, 0x3951ebb5L, 0x7ef19165L, 0x4391b8d5L,
0xa121b886L, 0x9c419136L, 0xdbe1ebe6L, 0xe681c256L,
0x54a11e46L, 0x69c137f6L, 0x2e614d26L, 0x13016496L,
0x9151f347L, 0xac31daf7L, 0xeb91a027L, 0xd6f18997L,
0x64d15587L, 0x59b17c37L, 0x1e1106e7L, 0x23712f57L,
0x58f35849L, 0x659371f9L, 0x22330b29L, 0x1f532299L,
0xad73fe89L, 0x9013d739L, 0xd7b3ade9L, 0xead38459L,
0x68831388L, 0x55e33a38L, 0x124340e8L, 0x2f236958L,
0x9d03b548L, 0xa0639cf8L, 0xe7c3e628L, 0xdaa3cf98L,
0x3813cfcbL, 0x0573e67bL, 0x42d39cabL, 0x7fb3b51bL,
0xcd93690bL, 0xf0f340bbL, 0xb7533a6bL, 0x8a3313dbL,
0x0863840aL, 0x3503adbaL, 0x72a3d76aL, 0x4fc3fedaL,
0xfde322caL, 0xc0830b7aL, 0x872371aaL, 0xba43581aL,
0x9932774dL, 0xa4525efdL, 0xe3f2242dL, 0xde920d9dL,
0x6cb2d18dL, 0x51d2f83dL, 0x167282edL, 0x2b12ab5dL,
0xa9423c8cL, 0x9422153cL, 0xd3826fecL, 0xeee2465cL,
0x5cc29a4cL, 0x61a2b3fcL, 0x2602c92cL, 0x1b62e09cL,
0xf9d2e0cfL, 0xc4b2c97fL, 0x8312b3afL, 0xbe729a1fL,
0x0c52460fL, 0x31326fbfL, 0x7692156fL, 0x4bf23cdfL,
0xc9a2ab0eL, 0xf4c282beL, 0xb362f86eL, 0x8e02d1deL,
0x3c220dceL, 0x0142247eL, 0x46e25eaeL, 0x7b82771eL,
0xb1e6b092L, 0x8c869922L, 0xcb26e3f2L, 0xf646ca42L,
0x44661652L, 0x79063fe2L, 0x3ea64532L, 0x03c66c82L,
0x8196fb53L, 0xbcf6d2e3L, 0xfb56a833L, 0xc6368183L,
0x74165d93L, 0x49767423L, 0x0ed60ef3L, 0x33b62743L,
0xd1062710L, 0xec660ea0L, 0xabc67470L, 0x96a65dc0L,
0x248681d0L, 0x19e6a860L, 0x5e46d2b0L, 0x6326fb00L,
0xe1766cd1L, 0xdc164561L, 0x9bb63fb1L, 0xa6d61601L,
0x14f6ca11L, 0x2996e3a1L, 0x6e369971L, 0x5356b0c1L,
0x70279f96L, 0x4d47b626L, 0x0ae7ccf6L, 0x3787e546L,
0x85a73956L, 0xb8c710e6L, 0xff676a36L, 0xc2074386L,
0x4057d457L, 0x7d37fde7L, 0x3a978737L, 0x07f7ae87L,
0xb5d77297L, 0x88b75b27L, 0xcf1721f7L, 0xf2770847L,
0x10c70814L, 0x2da721a4L, 0x6a075b74L, 0x576772c4L,
0xe547aed4L, 0xd8278764L, 0x9f87fdb4L, 0xa2e7d404L,
0x20b743d5L, 0x1dd76a65L, 0x5a7710b5L, 0x67173905L,
0xd537e515L, 0xe857cca5L, 0xaff7b675L, 0x92979fc5L,
0xe915e8dbL, 0xd475c16bL, 0x93d5bbbbL, 0xaeb5920bL,
0x1c954e1bL, 0x21f567abL, 0x66551d7bL, 0x5b3534cbL,
0xd965a31aL, 0xe4058aaaL, 0xa3a5f07aL, 0x9ec5d9caL,
0x2ce505daL, 0x11852c6aL, 0x562556baL, 0x6b457f0aL,
0x89f57f59L, 0xb49556e9L, 0xf3352c39L, 0xce550589L,
0x7c75d999L, 0x4115f029L, 0x06b58af9L, 0x3bd5a349L,
0xb9853498L, 0x84e51d28L, 0xc34567f8L, 0xfe254e48L,
0x4c059258L, 0x7165bbe8L, 0x36c5c138L, 0x0ba5e888L,
0x28d4c7dfL, 0x15b4ee6fL, 0x521494bfL, 0x6f74bd0fL,
0xdd54611fL, 0xe03448afL, 0xa794327fL, 0x9af41bcfL,
0x18a48c1eL, 0x25c4a5aeL, 0x6264df7eL, 0x5f04f6ceL,
0xed242adeL, 0xd044036eL, 0x97e479beL, 0xaa84500eL,
0x4834505dL, 0x755479edL, 0x32f4033dL, 0x0f942a8dL,
0xbdb4f69dL, 0x80d4df2dL, 0xc774a5fdL, 0xfa148c4dL,
0x78441b9cL, 0x4524322cL, 0x028448fcL, 0x3fe4614cL,
0x8dc4bd5cL, 0xb0a494ecL, 0xf704ee3cL, 0xca64c78cL],
[
0x00000000L, 0xcb5cd3a5L, 0x4dc8a10bL, 0x869472aeL,
0x9b914216L, 0x50cd91b3L, 0xd659e31dL, 0x1d0530b8L,
0xec53826dL, 0x270f51c8L, 0xa19b2366L, 0x6ac7f0c3L,
0x77c2c07bL, 0xbc9e13deL, 0x3a0a6170L, 0xf156b2d5L,
0x03d6029bL, 0xc88ad13eL, 0x4e1ea390L, 0x85427035L,
0x9847408dL, 0x531b9328L, 0xd58fe186L, 0x1ed33223L,
0xef8580f6L, 0x24d95353L, 0xa24d21fdL, 0x6911f258L,
0x7414c2e0L, 0xbf481145L, 0x39dc63ebL, 0xf280b04eL,
0x07ac0536L, 0xccf0d693L, 0x4a64a43dL, 0x81387798L,
0x9c3d4720L, 0x57619485L, 0xd1f5e62bL, 0x1aa9358eL,
0xebff875bL, 0x20a354feL, 0xa6372650L, 0x6d6bf5f5L,
0x706ec54dL, 0xbb3216e8L, 0x3da66446L, 0xf6fab7e3L,
0x047a07adL, 0xcf26d408L, 0x49b2a6a6L, 0x82ee7503L,
0x9feb45bbL, 0x54b7961eL, 0xd223e4b0L, 0x197f3715L,
0xe82985c0L, 0x23755665L, 0xa5e124cbL, 0x6ebdf76eL,
0x73b8c7d6L, 0xb8e41473L, 0x3e7066ddL, 0xf52cb578L,
0x0f580a6cL, 0xc404d9c9L, 0x4290ab67L, 0x89cc78c2L,
0x94c9487aL, 0x5f959bdfL, 0xd901e971L, 0x125d3ad4L,
0xe30b8801L, 0x28575ba4L, 0xaec3290aL, 0x659ffaafL,
0x789aca17L, 0xb3c619b2L, 0x35526b1cL, 0xfe0eb8b9L,
0x0c8e08f7L, 0xc7d2db52L, 0x4146a9fcL, 0x8a1a7a59L,
0x971f4ae1L, 0x5c439944L, 0xdad7ebeaL, 0x118b384fL,
0xe0dd8a9aL, 0x2b81593fL, 0xad152b91L, 0x6649f834L,
0x7b4cc88cL, 0xb0101b29L, 0x36846987L, 0xfdd8ba22L,
0x08f40f5aL, 0xc3a8dcffL, 0x453cae51L, 0x8e607df4L,
0x93654d4cL, 0x58399ee9L, 0xdeadec47L, 0x15f13fe2L,
0xe4a78d37L, 0x2ffb5e92L, 0xa96f2c3cL, 0x6233ff99L,
0x7f36cf21L, 0xb46a1c84L, 0x32fe6e2aL, 0xf9a2bd8fL,
0x0b220dc1L, 0xc07ede64L, 0x46eaaccaL, 0x8db67f6fL,
0x90b34fd7L, 0x5bef9c72L, 0xdd7beedcL, 0x16273d79L,
0xe7718facL, 0x2c2d5c09L, 0xaab92ea7L, 0x61e5fd02L,
0x7ce0cdbaL, 0xb7bc1e1fL, 0x31286cb1L, 0xfa74bf14L,
0x1eb014d8L, 0xd5ecc77dL, 0x5378b5d3L, 0x98246676L,
0x852156ceL, 0x4e7d856bL, 0xc8e9f7c5L, 0x03b52460L,
0xf2e396b5L, 0x39bf4510L, 0xbf2b37beL, 0x7477e41bL,
0x6972d4a3L, 0xa22e0706L, 0x24ba75a8L, 0xefe6a60dL,
0x1d661643L, 0xd63ac5e6L, 0x50aeb748L, 0x9bf264edL,
0x86f75455L, 0x4dab87f0L, 0xcb3ff55eL, 0x006326fbL,
0xf135942eL, 0x3a69478bL, 0xbcfd3525L, 0x77a1e680L,
0x6aa4d638L, 0xa1f8059dL, 0x276c7733L, 0xec30a496L,
0x191c11eeL, 0xd240c24bL, 0x54d4b0e5L, 0x9f886340L,
0x828d53f8L, 0x49d1805dL, 0xcf45f2f3L, 0x04192156L,
0xf54f9383L, 0x3e134026L, 0xb8873288L, 0x73dbe12dL,
0x6eded195L, 0xa5820230L, 0x2316709eL, 0xe84aa33bL,
0x1aca1375L, 0xd196c0d0L, 0x5702b27eL, 0x9c5e61dbL,
0x815b5163L, 0x4a0782c6L, 0xcc93f068L, 0x07cf23cdL,
0xf6999118L, 0x3dc542bdL, 0xbb513013L, 0x700de3b6L,
0x6d08d30eL, 0xa65400abL, 0x20c07205L, 0xeb9ca1a0L,
0x11e81eb4L, 0xdab4cd11L, 0x5c20bfbfL, 0x977c6c1aL,
0x8a795ca2L, 0x41258f07L, 0xc7b1fda9L, 0x0ced2e0cL,
0xfdbb9cd9L, 0x36e74f7cL, 0xb0733dd2L, 0x7b2fee77L,
0x662adecfL, 0xad760d6aL, 0x2be27fc4L, 0xe0beac61L,
0x123e1c2fL, 0xd962cf8aL, 0x5ff6bd24L, 0x94aa6e81L,
0x89af5e39L, 0x42f38d9cL, 0xc467ff32L, 0x0f3b2c97L,
0xfe6d9e42L, 0x35314de7L, 0xb3a53f49L, 0x78f9ececL,
0x65fcdc54L, 0xaea00ff1L, 0x28347d5fL, 0xe368aefaL,
0x16441b82L, 0xdd18c827L, 0x5b8cba89L, 0x90d0692cL,
0x8dd55994L, 0x46898a31L, 0xc01df89fL, 0x0b412b3aL,
0xfa1799efL, 0x314b4a4aL, 0xb7df38e4L, 0x7c83eb41L,
0x6186dbf9L, 0xaada085cL, 0x2c4e7af2L, 0xe712a957L,
0x15921919L, 0xdececabcL, 0x585ab812L, 0x93066bb7L,
0x8e035b0fL, 0x455f88aaL, 0xc3cbfa04L, 0x089729a1L,
0xf9c19b74L, 0x329d48d1L, 0xb4093a7fL, 0x7f55e9daL,
0x6250d962L, 0xa90c0ac7L, 0x2f987869L, 0xe4c4abccL],
[
0x00000000L, 0xa6770bb4L, 0x979f1129L, 0x31e81a9dL,
0xf44f2413L, 0x52382fa7L, 0x63d0353aL, 0xc5a73e8eL,
0x33ef4e67L, 0x959845d3L, 0xa4705f4eL, 0x020754faL,
0xc7a06a74L, 0x61d761c0L, 0x503f7b5dL, 0xf64870e9L,
0x67de9cceL, 0xc1a9977aL, 0xf0418de7L, 0x56368653L,
0x9391b8ddL, 0x35e6b369L, 0x040ea9f4L, 0xa279a240L,
0x5431d2a9L, 0xf246d91dL, 0xc3aec380L, 0x65d9c834L,
0xa07ef6baL, 0x0609fd0eL, 0x37e1e793L, 0x9196ec27L,
0xcfbd399cL, 0x69ca3228L, 0x582228b5L, 0xfe552301L,
0x3bf21d8fL, 0x9d85163bL, 0xac6d0ca6L, 0x0a1a0712L,
0xfc5277fbL, 0x5a257c4fL, 0x6bcd66d2L, 0xcdba6d66L,
0x081d53e8L, 0xae6a585cL, 0x9f8242c1L, 0x39f54975L,
0xa863a552L, 0x0e14aee6L, 0x3ffcb47bL, 0x998bbfcfL,
0x5c2c8141L, 0xfa5b8af5L, 0xcbb39068L, 0x6dc49bdcL,
0x9b8ceb35L, 0x3dfbe081L, 0x0c13fa1cL, 0xaa64f1a8L,
0x6fc3cf26L, 0xc9b4c492L, 0xf85cde0fL, 0x5e2bd5bbL,
0x440b7579L, 0xe27c7ecdL, 0xd3946450L, 0x75e36fe4L,
0xb044516aL, 0x16335adeL, 0x27db4043L, 0x81ac4bf7L,
0x77e43b1eL, 0xd19330aaL, 0xe07b2a37L, 0x460c2183L,
0x83ab1f0dL, 0x25dc14b9L, 0x14340e24L, 0xb2430590L,
0x23d5e9b7L, 0x85a2e203L, 0xb44af89eL, 0x123df32aL,
0xd79acda4L, 0x71edc610L, 0x4005dc8dL, 0xe672d739L,
0x103aa7d0L, 0xb64dac64L, 0x87a5b6f9L, 0x21d2bd4dL,
0xe47583c3L, 0x42028877L, 0x73ea92eaL, 0xd59d995eL,
0x8bb64ce5L, 0x2dc14751L, 0x1c295dccL, 0xba5e5678L,
0x7ff968f6L, 0xd98e6342L, 0xe86679dfL, 0x4e11726bL,
0xb8590282L, 0x1e2e0936L, 0x2fc613abL, 0x89b1181fL,
0x4c162691L, 0xea612d25L, 0xdb8937b8L, 0x7dfe3c0cL,
0xec68d02bL, 0x4a1fdb9fL, 0x7bf7c102L, 0xdd80cab6L,
0x1827f438L, 0xbe50ff8cL, 0x8fb8e511L, 0x29cfeea5L,
0xdf879e4cL, 0x79f095f8L, 0x48188f65L, 0xee6f84d1L,
0x2bc8ba5fL, 0x8dbfb1ebL, 0xbc57ab76L, 0x1a20a0c2L,
0x8816eaf2L, 0x2e61e146L, 0x1f89fbdbL, 0xb9fef06fL,
0x7c59cee1L, 0xda2ec555L, 0xebc6dfc8L, 0x4db1d47cL,
0xbbf9a495L, 0x1d8eaf21L, 0x2c66b5bcL, 0x8a11be08L,
0x4fb68086L, 0xe9c18b32L, 0xd82991afL, 0x7e5e9a1bL,
0xefc8763cL, 0x49bf7d88L, 0x78576715L, 0xde206ca1L,
0x1b87522fL, 0xbdf0599bL, 0x8c184306L, 0x2a6f48b2L,
0xdc27385bL, 0x7a5033efL, 0x4bb82972L, 0xedcf22c6L,
0x28681c48L, 0x8e1f17fcL, 0xbff70d61L, 0x198006d5L,
0x47abd36eL, 0xe1dcd8daL, 0xd034c247L, 0x7643c9f3L,
0xb3e4f77dL, 0x1593fcc9L, 0x247be654L, 0x820cede0L,
0x74449d09L, 0xd23396bdL, 0xe3db8c20L, 0x45ac8794L,
0x800bb91aL, 0x267cb2aeL, 0x1794a833L, 0xb1e3a387L,
0x20754fa0L, 0x86024414L, 0xb7ea5e89L, 0x119d553dL,
0xd43a6bb3L, 0x724d6007L, 0x43a57a9aL, 0xe5d2712eL,
0x139a01c7L, 0xb5ed0a73L, 0x840510eeL, 0x22721b5aL,
0xe7d525d4L, 0x41a22e60L, 0x704a34fdL, 0xd63d3f49L,
0xcc1d9f8bL, 0x6a6a943fL, 0x5b828ea2L, 0xfdf58516L,
0x3852bb98L, 0x9e25b02cL, 0xafcdaab1L, 0x09baa105L,
0xfff2d1ecL, 0x5985da58L, 0x686dc0c5L, 0xce1acb71L,
0x0bbdf5ffL, 0xadcafe4bL, 0x9c22e4d6L, 0x3a55ef62L,
0xabc30345L, 0x0db408f1L, 0x3c5c126cL, 0x9a2b19d8L,
0x5f8c2756L, 0xf9fb2ce2L, 0xc813367fL, 0x6e643dcbL,
0x982c4d22L, 0x3e5b4696L, 0x0fb35c0bL, 0xa9c457bfL,
0x6c636931L, 0xca146285L, 0xfbfc7818L, 0x5d8b73acL,
0x03a0a617L, 0xa5d7ada3L, 0x943fb73eL, 0x3248bc8aL,
0xf7ef8204L, 0x519889b0L, 0x6070932dL, 0xc6079899L,
0x304fe870L, 0x9638e3c4L, 0xa7d0f959L, 0x01a7f2edL,
0xc400cc63L, 0x6277c7d7L, 0x539fdd4aL, 0xf5e8d6feL,
0x647e3ad9L, 0xc209316dL, 0xf3e12bf0L, 0x55962044L,
0x90311ecaL, 0x3646157eL, 0x07ae0fe3L, 0xa1d90457L,
0x579174beL, 0xf1e67f0aL, 0xc00e6597L, 0x66796e23L,
0xa3de50adL, 0x05a95b19L, 0x34414184L, 0x92364a30L],
[
0x00000000L, 0xccaa009eL, 0x4225077dL, 0x8e8f07e3L,
0x844a0efaL, 0x48e00e64L, 0xc66f0987L, 0x0ac50919L,
0xd3e51bb5L, 0x1f4f1b2bL, 0x91c01cc8L, 0x5d6a1c56L,
0x57af154fL, 0x9b0515d1L, 0x158a1232L, 0xd92012acL,
0x7cbb312bL, 0xb01131b5L, 0x3e9e3656L, 0xf23436c8L,
0xf8f13fd1L, 0x345b3f4fL, 0xbad438acL, 0x767e3832L,
0xaf5e2a9eL, 0x63f42a00L, 0xed7b2de3L, 0x21d12d7dL,
0x2b142464L, 0xe7be24faL, 0x69312319L, 0xa59b2387L,
0xf9766256L, 0x35dc62c8L, 0xbb53652bL, 0x77f965b5L,
0x7d3c6cacL, 0xb1966c32L, 0x3f196bd1L, 0xf3b36b4fL,
0x2a9379e3L, 0xe639797dL, 0x68b67e9eL, 0xa41c7e00L,
0xaed97719L, 0x62737787L, 0xecfc7064L, 0x205670faL,
0x85cd537dL, 0x496753e3L, 0xc7e85400L, 0x0b42549eL,
0x01875d87L, 0xcd2d5d19L, 0x43a25afaL, 0x8f085a64L,
0x562848c8L, 0x9a824856L, 0x140d4fb5L, 0xd8a74f2bL,
0xd2624632L, 0x1ec846acL, 0x9047414fL, 0x5ced41d1L,
0x299dc2edL, 0xe537c273L, 0x6bb8c590L, 0xa712c50eL,
0xadd7cc17L, 0x617dcc89L, 0xeff2cb6aL, 0x2358cbf4L,
0xfa78d958L, 0x36d2d9c6L, 0xb85dde25L, 0x74f7debbL,
0x7e32d7a2L, 0xb298d73cL, 0x3c17d0dfL, 0xf0bdd041L,
0x5526f3c6L, 0x998cf358L, 0x1703f4bbL, 0xdba9f425L,
0xd16cfd3cL, 0x1dc6fda2L, 0x9349fa41L, 0x5fe3fadfL,
0x86c3e873L, 0x4a69e8edL, 0xc4e6ef0eL, 0x084cef90L,
0x0289e689L, 0xce23e617L, 0x40ace1f4L, 0x8c06e16aL,
0xd0eba0bbL, 0x1c41a025L, 0x92cea7c6L, 0x5e64a758L,
0x54a1ae41L, 0x980baedfL, 0x1684a93cL, 0xda2ea9a2L,
0x030ebb0eL, 0xcfa4bb90L, 0x412bbc73L, 0x8d81bcedL,
0x8744b5f4L, 0x4beeb56aL, 0xc561b289L, 0x09cbb217L,
0xac509190L, 0x60fa910eL, 0xee7596edL, 0x22df9673L,
0x281a9f6aL, 0xe4b09ff4L, 0x6a3f9817L, 0xa6959889L,
0x7fb58a25L, 0xb31f8abbL, 0x3d908d58L, 0xf13a8dc6L,
0xfbff84dfL, 0x37558441L, 0xb9da83a2L, 0x7570833cL,
0x533b85daL, 0x9f918544L, 0x111e82a7L, 0xddb48239L,
0xd7718b20L, 0x1bdb8bbeL, 0x95548c5dL, 0x59fe8cc3L,
0x80de9e6fL, 0x4c749ef1L, 0xc2fb9912L, 0x0e51998cL,
0x04949095L, 0xc83e900bL, 0x46b197e8L, 0x8a1b9776L,
0x2f80b4f1L, 0xe32ab46fL, 0x6da5b38cL, 0xa10fb312L,
0xabcaba0bL, 0x6760ba95L, 0xe9efbd76L, 0x2545bde8L,
0xfc65af44L, 0x30cfafdaL, 0xbe40a839L, 0x72eaa8a7L,
0x782fa1beL, 0xb485a120L, 0x3a0aa6c3L, 0xf6a0a65dL,
0xaa4de78cL, 0x66e7e712L, 0xe868e0f1L, 0x24c2e06fL,
0x2e07e976L, 0xe2ade9e8L, 0x6c22ee0bL, 0xa088ee95L,
0x79a8fc39L, 0xb502fca7L, 0x3b8dfb44L, 0xf727fbdaL,
0xfde2f2c3L, 0x3148f25dL, 0xbfc7f5beL, 0x736df520L,
0xd6f6d6a7L, 0x1a5cd639L, 0x94d3d1daL, 0x5879d144L,
0x52bcd85dL, 0x9e16d8c3L, 0x1099df20L, 0xdc33dfbeL,
0x0513cd12L, 0xc9b9cd8cL, 0x4736ca6fL, 0x8b9ccaf1L,
0x8159c3e8L, 0x4df3c376L, 0xc37cc495L, 0x0fd6c40bL,
0x7aa64737L, 0xb60c47a9L, 0x3883404aL, 0xf42940d4L,
0xfeec49cdL, 0x32464953L, 0xbcc94eb0L, 0x70634e2eL,
0xa9435c82L, 0x65e95c1cL, 0xeb665bffL, 0x27cc5b61L,
0x2d095278L, 0xe1a352e6L, 0x6f2c5505L, 0xa386559bL,
0x061d761cL, 0xcab77682L, 0x44387161L, 0x889271ffL,
0x825778e6L, 0x4efd7878L, 0xc0727f9bL, 0x0cd87f05L,
0xd5f86da9L, 0x19526d37L, 0x97dd6ad4L, 0x5b776a4aL,
0x51b26353L, 0x9d1863cdL, 0x1397642eL, 0xdf3d64b0L,
0x83d02561L, 0x4f7a25ffL, 0xc1f5221cL, 0x0d5f2282L,
0x079a2b9bL, 0xcb302b05L, 0x45bf2ce6L, 0x89152c78L,
0x50353ed4L, 0x9c9f3e4aL, 0x121039a9L, 0xdeba3937L,
0xd47f302eL, 0x18d530b0L, 0x965a3753L, 0x5af037cdL,
0xff6b144aL, 0x33c114d4L, 0xbd4e1337L, 0x71e413a9L,
0x7b211ab0L, 0xb78b1a2eL, 0x39041dcdL, 0xf5ae1d53L,
0x2c8e0fffL, 0xe0240f61L, 0x6eab0882L, 0xa201081cL,
0xa8c40105L, 0x646e019bL, 0xeae10678L, 0x264b06e6L],
]
class CRC32:
CRCPOLY_LE=0xedb88320
CRCPOLY_BE=0x04c11db7
CRC_LE_BITS=0
CRC_BE_BITS=0
def set_sarwate(self):
self.CRC_LE_BITS=8
self.CRC_BE_BITS=8
def crc32_le_generic(self,crc,buffer,tab,polynomial):
if self.CRC_LE_BITS==8:
for ch in buffer:
crc ^= ord(ch)
crc = (crc>>8) ^ tab[0][crc&255];
return crc
def crc32_le(self,crc,buffer):
return self.crc32_le_generic(crc,buffer,crc32table_le,self.CRCPOLY_LE)
def calc(self,data):
return self.crc32_le(0,data)
def calc_file(self,filename):
fd=open(filename,'rb')
data=fd.read()
fd.close()
print "%x" % self.calc(data)
if __name__=='__main__':
crc32=CRC32()
crc32.set_sarwate()
crc32.calc_file('payload.gz')