about summary refs log tree commit diff
path: root/md5-crypt/md5c-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'md5-crypt/md5c-test.c')
-rw-r--r--md5-crypt/md5c-test.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/md5-crypt/md5c-test.c b/md5-crypt/md5c-test.c
new file mode 100644
index 0000000000..f56d0eb4ab
--- /dev/null
+++ b/md5-crypt/md5c-test.c
@@ -0,0 +1,15 @@
+#include <crypt.h>
+#include <string.h>
+
+int
+main (int argc, char *argv[])
+{
+  const char salt[] = "$1$saltstring";
+  char *cp;
+  int result = 0;
+
+  cp = crypt ("Hello world!", salt);
+  result |= strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp);
+
+  return result;
+}