summaryrefslogtreecommitdiffhomepage
path: root/demos/test.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-03-08 12:58:00 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-03-08 12:58:00 +0000
commitc57e1d8def6e38d350da8b098a91806d405e952e (patch)
treedbd7bff4e514b7bfd2f2fe365eeaaea77ebafffd /demos/test.c
Re-import libtomcrypt 1.05 for cleaner propagating.
From crypt-1.05.tar.bz2, SHA1 of 88250202bb51570dc64f7e8f1c943cda9479258f --HG-- branch : libtomcrypt-orig extra : convert_revision : 5c0c50e93111636ccf8deb758a689ad713797baf
Diffstat (limited to 'demos/test.c')
-rw-r--r--demos/test.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/demos/test.c b/demos/test.c
new file mode 100644
index 0000000..f6c7170
--- /dev/null
+++ b/demos/test.c
@@ -0,0 +1,24 @@
+#include <tomcrypt_test.h>
+
+int main(void)
+{
+ int x;
+ reg_algs();
+ printf("build == \n%s\n", crypt_build_settings);
+ printf("\nstore_test...."); fflush(stdout); x = store_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\ncipher_test..."); fflush(stdout); x = cipher_hash_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\nmodes_test...."); fflush(stdout); x = modes_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\nder_test......"); fflush(stdout); x = der_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\nmac_test......"); fflush(stdout); x = mac_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\npkcs_1_test..."); fflush(stdout); x = pkcs_1_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\nrsa_test......"); fflush(stdout); x = rsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\necc_test......"); fflush(stdout); x = ecc_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\ndsa_test......"); fflush(stdout); x = dsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\ndh_test......."); fflush(stdout); x = dh_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
+ printf("\n");
+ return EXIT_SUCCESS;
+}
+
+/* $Source: /cvs/libtom/libtomcrypt/demos/test.c,v $ */
+/* $Revision: 1.12 $ */
+/* $Date: 2005/06/19 12:06:58 $ */