blob: a3d7364da893d53adf16bd3c8ddaba3c1380a503 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <md5.h>
int
main(int argc, char **argv)
{
MD5_CTX ctx;
unsigned char *data = malloc(10);
char ret[33];
strlcpy(data, "123456789", 10);
MD5Init(&ctx);
MD5Data(data, sizeof data, ret);
printf("%s\n", ret);
}
|