blob: 3c61540213f13d846cc3cfe83de963e92d07d546 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#include <stdlib.h>
2#include <stdio.h>
3#include <string.h>
4#include <crypt.h>
5
6int
7main (int argc, char *argv[])
8{
9 const char salt[] = "$1$saltstring";
10 char *cp;
11
12 cp = crypt ("Hello world!", salt);
13 if (strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp)) {
14 fprintf(stderr, "Failed md5 crypt test!\n");
15 return EXIT_FAILURE;
16 }
17 fprintf(stderr, "Passed md5 crypt test!\n");
18 return EXIT_SUCCESS;
19}