X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fmd4%2F_info.c;fp=ccan%2Fmd4%2F_info.c;h=d3c2c420c1130982f17d7792b5a93b31b126e6b4;hb=a16a125d3c1fae99f7a261ed65fc7d3729c4d1e5;hp=0000000000000000000000000000000000000000;hpb=3404ba2a1b34e766628d5b9febf401011aa6753f;p=ccan diff --git a/ccan/md4/_info.c b/ccan/md4/_info.c new file mode 100644 index 00000000..d3c2c420 --- /dev/null +++ b/ccan/md4/_info.c @@ -0,0 +1,48 @@ +#include +#include +#include "config.h" + +/** + * md4 - MD4 Message Digest Algorithm (RFC1320). + * + * Message Digest #4 is a 128-bit hashing algorithm; it is quick but + * not sufficiently strong for cryptographic use (duplicates can be + * found very efficiently). It provides sufficient mixing to have an + * avalanche effect: any change in input changes the output completely. + * + * Example: + * #include + * #include + * + * // Provide MD4 sums of the input strings. + * int main(int argc, char *argv[]) + * { + * unsigned int i, j; + * struct md4_ctx ctx; + * + * for (i = 1; i < argc; i++) { + * md4_init(&ctx); + * md4_hash(&ctx, argv[i], strlen(argv[i])); + * md4_finish(&ctx); + * for (j = 0; j < 16; j++) + * printf("%02x", ctx.hash.bytes[j]); + * printf("\n"); + * } + * return 0; + * } + * + * Licence: LGPL (2 or any later version) + */ +int main(int argc, char *argv[]) +{ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) { + printf("ccan/endian\n"); + printf("ccan/array_size\n"); + return 0; + } + + return 1; +}