ccan/crc: remove broken "crc32c" routines which gave wrong results.
[ccan] / ccan / crc / _info
1 #include "config.h"
2 #include <string.h>
3 #include <stdio.h>
4
5 /**
6  * crc - routines for crc of bytes
7  *
8  * Cyclic Redundancy Check routines.  These are reasonably fast
9  * checksum routines, but not suitable for cryptographic use.
10  *
11  * They are useful for simple error detection, eg. a 32-bit CRC will
12  * detect a single error burst of up to 32 bits.
13  *
14  * Example:
15  *      #include <ccan/crc/crc.h>
16  *      #include <stdio.h>
17  *      #include <stdlib.h>
18  *
19  *      // Given "IHATEMATH" outputs 0x35c6ad5a
20  *      int main(int argc, char *argv[])
21  *      {
22  *              if (argc != 2) {
23  *                      fprintf(stderr, "Usage: %s <string>\n"
24  *                              "Prints 32 bit CRC of the string\n", argv[0]);
25  *                      exit(1);
26  *              }
27  *              printf("0x%08x\n", crc32_ieee(0, argv[1], strlen(argv[1])));
28  *              exit(0);
29  *      }
30  *
31  * License: GPL (v2 or any later version)
32  * Author: Gary S. Brown, Clay Haapala
33  * Maintainer: Rusty Russell <rusty@rustcorp.com.au>
34  */
35 int main(int argc, char *argv[])
36 {
37         if (argc != 2)
38                 return 1;
39
40         if (strcmp(argv[1], "depends") == 0) {
41                 printf("ccan/array_size\n");
42                 return 0;
43         }
44
45         return 1;
46 }