Mercurial > dropbear
comparison demos/test.c @ 380:d5faf4814ddb libtomcrypt-orig libtomcrypt-1.16
Update to LibTomCrypt 1.16
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 11 Jan 2007 02:22:00 +0000 |
parents | 59400faa4b44 |
children |
comparison
equal
deleted
inserted
replaced
280:59400faa4b44 | 380:d5faf4814ddb |
---|---|
2 | 2 |
3 int main(void) | 3 int main(void) |
4 { | 4 { |
5 int x; | 5 int x; |
6 reg_algs(); | 6 reg_algs(); |
7 | |
8 #ifdef USE_LTM | |
9 ltc_mp = ltm_desc; | |
10 #elif defined(USE_TFM) | |
11 ltc_mp = tfm_desc; | |
12 #elif defined(USE_GMP) | |
13 ltc_mp = gmp_desc; | |
14 #else | |
15 extern ltc_math_descriptor EXT_MATH_LIB; | |
16 ltc_mp = EXT_MATH_LIB; | |
17 #endif | |
18 | |
7 printf("build == \n%s\n", crypt_build_settings); | 19 printf("build == \n%s\n", crypt_build_settings); |
8 printf("\nstore_test...."); fflush(stdout); x = store_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 20 printf("\nstore_test...."); fflush(stdout); x = store_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
9 printf("\ncipher_test..."); fflush(stdout); x = cipher_hash_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 21 printf("\ncipher_test..."); fflush(stdout); x = cipher_hash_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
10 printf("\nmodes_test...."); fflush(stdout); x = modes_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 22 printf("\nmodes_test...."); fflush(stdout); x = modes_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
11 printf("\nder_test......"); fflush(stdout); x = der_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 23 printf("\nder_test......"); fflush(stdout); x = der_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
12 printf("\nmac_test......"); fflush(stdout); x = mac_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 24 printf("\nmac_test......"); fflush(stdout); x = mac_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
13 printf("\npkcs_1_test..."); fflush(stdout); x = pkcs_1_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 25 printf("\npkcs_1_test..."); fflush(stdout); x = pkcs_1_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
14 printf("\nrsa_test......"); fflush(stdout); x = rsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 26 printf("\nrsa_test......"); fflush(stdout); x = rsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
15 printf("\necc_test......"); fflush(stdout); x = ecc_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 27 printf("\necc_test......"); fflush(stdout); x = ecc_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
16 printf("\ndsa_test......"); fflush(stdout); x = dsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 28 printf("\ndsa_test......"); fflush(stdout); x = dsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
17 printf("\ndh_test......."); fflush(stdout); x = dh_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); | 29 printf("\nkatja_test...."); fflush(stdout); x = katja_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); |
18 printf("\n"); | 30 printf("\n"); |
19 return EXIT_SUCCESS; | 31 return EXIT_SUCCESS; |
20 } | 32 } |
21 | 33 |
22 /* $Source: /cvs/libtom/libtomcrypt/demos/test.c,v $ */ | 34 /* $Source: /cvs/libtom/libtomcrypt/demos/test.c,v $ */ |
23 /* $Revision: 1.12 $ */ | 35 /* $Revision: 1.28 $ */ |
24 /* $Date: 2005/06/19 12:06:58 $ */ | 36 /* $Date: 2006/05/25 10:50:08 $ */ |