| lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #include <stdlib.h> |
| 2 | #include <stdio.h> | ||||
| 3 | #include <string.h> | ||||
| 4 | #include <crypt.h> | ||||
| 5 | |||||
| 6 | int | ||||
| 7 | main (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 | } | ||||