]> git.ozlabs.org Git - ccan/blob - ccan/md4/_info
tdb2: don't cancel transactions on lock failures in tdb1 backend.
[ccan] / ccan / md4 / _info
1 #include <stdio.h>
2 #include <string.h>
3 #include "config.h"
4
5 /**
6  * md4 - MD4 Message Digest Algorithm (RFC1320).
7  *
8  * Message Digest #4 is a 128-bit hashing algorithm; it is quick but
9  * not sufficiently strong for cryptographic use (duplicates can be
10  * found very efficiently).  It provides sufficient mixing to have an
11  * avalanche effect: any change in input changes the output completely.
12  *
13  * Example:
14  *      #include <stdio.h>
15  *      #include <ccan/md4/md4.h>
16  *
17  *      // Provide MD4 sums of the input strings.
18  *      int main(int argc, char *argv[])
19  *      {
20  *              unsigned int i, j;
21  *              struct md4_ctx ctx;
22  *
23  *              for (i = 1; i < argc; i++) {
24  *                      md4_init(&ctx);
25  *                      md4_hash(&ctx, argv[i], strlen(argv[i]));
26  *                      md4_finish(&ctx);
27  *                      for (j = 0; j < 16; j++)
28  *                              printf("%02x", ctx.hash.bytes[j]);
29  *                      printf("\n");
30  *              }
31  *              return 0;
32  *      }
33  *
34  * License: GPL (v2 or any later version)
35  */
36 int main(int argc, char *argv[])
37 {
38         if (argc != 2)
39                 return 1;
40
41         if (strcmp(argv[1], "depends") == 0) {
42                 printf("ccan/endian\n");
43                 printf("ccan/array_size\n");
44                 return 0;
45         }
46
47         return 1;
48 }