6 * crc - routines for crc of bytes
8 * Cyclic Redundancy Check routines. These are reasonably fast
9 * checksum routines, but not suitable for cryptographic use.
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.
15 * #include <ccan/crc/crc.h>
19 * // Given "IHATEMATH" outputs 0x98a3b8df
20 * int main(int argc, char *argv[])
23 * fprintf(stderr, "Usage: %s <string>\n"
24 * "Prints 32 bit CRC of the string\n", argv[0]);
27 * printf("0x%08x\n", crc32c(0, argv[1], strlen(argv[1])));
31 * License: GPL (v2 or any later version)
32 * Author: Gary S. Brown, Clay Haapala
33 * Maintainer: Rusty Russell <rusty@rustcorp.com.au>
35 int main(int argc, char *argv[])
40 if (strcmp(argv[1], "depends") == 0) {
41 printf("ccan/array_size\n");