about summary refs log tree commit diff
path: root/crypt/md5c-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypt/md5c-test.c')
-rw-r--r--crypt/md5c-test.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/crypt/md5c-test.c b/crypt/md5c-test.c
new file mode 100644
index 0000000000..f56d0eb4ab
--- /dev/null
+++ b/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;
+}