]> git.saurik.com Git - apple/security.git/blobdiff - libsecurity_checkpw/test/perf-checkpw.c
Security-55163.44.tar.gz
[apple/security.git] / libsecurity_checkpw / test / perf-checkpw.c
diff --git a/libsecurity_checkpw/test/perf-checkpw.c b/libsecurity_checkpw/test/perf-checkpw.c
new file mode 100644 (file)
index 0000000..425827d
--- /dev/null
@@ -0,0 +1,24 @@
+
+
+#include <security/checkpw.h>
+#include <stdio.h>
+
+int
+main(int argv, char *argc[])
+{
+       char *uname = "local";
+       char *pass = "local";
+       int retval = 0, i = 0;
+
+       for(i=0; i < 1024; i++)
+       {
+               retval = checkpw(uname, pass);
+               if (0 != retval)
+               {
+                       printf("Incorrect password.\n");
+                       break;
+               }
+       }
+
+       return retval;
+}