comparison demos/test.c @ 209:39d5d58461d6 libtomcrypt-orig LTC_1.05

Import of libtomcrypt 1.05
author Matt Johnston <matt@ucc.asn.au>
date Wed, 06 Jul 2005 03:53:40 +0000
parents 1c15b283127b
children a3e31d3983cb
comparison
equal deleted inserted replaced
191:1c15b283127b 209:39d5d58461d6
1 #include <tomcrypt_test.h> 1 #include <tomcrypt_test.h>
2 2
3 int main(void) 3 int main(void)
4 { 4 {
5 int x;
5 reg_algs(); 6 reg_algs();
6 printf("build == \n%s\n", crypt_build_settings); 7 printf("build == \n%s\n", crypt_build_settings);
7 printf("\ncipher_test..."); fflush(stdout); printf(cipher_hash_test() ? "failed" : "passed"); 8 printf("\nstore_test...."); fflush(stdout); x = store_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
8 printf("\nmodes_test..."); fflush(stdout); printf(modes_test() ? "failed" : "passed"); 9 printf("\ncipher_test..."); fflush(stdout); x = cipher_hash_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
9 printf("\nmac_test..."); fflush(stdout); printf(mac_test() ? "failed" : "passed"); 10 printf("\nmodes_test...."); fflush(stdout); x = modes_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
10 printf("\npkcs_1_test..."); fflush(stdout); printf(pkcs_1_test() ? "failed" : "passed"); 11 printf("\nder_test......"); fflush(stdout); x = der_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
11 printf("\nstore_test..."); fflush(stdout); printf(store_test() ? "failed" : "passed"); 12 printf("\nmac_test......"); fflush(stdout); x = mac_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
12 printf("\nrsa_test..."); fflush(stdout); printf(rsa_test() ? "failed" : "passed"); 13 printf("\npkcs_1_test..."); fflush(stdout); x = pkcs_1_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
13 printf("\necc_test..."); fflush(stdout); printf(ecc_tests() ? "failed" : "passed"); 14 printf("\nrsa_test......"); fflush(stdout); x = rsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
14 printf("\ndsa_test..."); fflush(stdout); printf(dsa_test() ? "failed" : "passed"); 15 printf("\necc_test......"); fflush(stdout); x = ecc_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
15 printf("\ndh_test..."); fflush(stdout); printf(dh_tests() ? "failed" : "passed"); 16 printf("\ndsa_test......"); fflush(stdout); x = dsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
16 printf("\nder_test..."); fflush(stdout); printf(der_tests() ? "failed" : "passed"); 17 printf("\ndh_test......."); fflush(stdout); x = dh_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
17 18 printf("\n");
18 return EXIT_SUCCESS; 19 return EXIT_SUCCESS;
19 } 20 }
21
22 /* $Source: /cvs/libtom/libtomcrypt/demos/test.c,v $ */
23 /* $Revision: 1.12 $ */
24 /* $Date: 2005/06/19 12:06:58 $ */