예제 #1
0
파일: tv_gen.c 프로젝트: dyemanov/firebird
int main(void)
{
   register_all_ciphers();
   register_all_hashes();
   register_all_prngs();
#ifdef USE_LTM
   ltc_mp = ltm_desc;
#elif defined(USE_TFM)
   ltc_mp = tfm_desc;
#elif defined(USE_GMP)
   ltc_mp = gmp_desc;
#elif defined(EXT_MATH_LIB)
   extern ltc_math_descriptor EXT_MATH_LIB;
   ltc_mp = EXT_MATH_LIB;
#else
   fprintf(stderr, "No MPI provider available\n");
   exit(EXIT_FAILURE);
#endif

   printf("Generating hash   vectors..."); fflush(stdout); hash_gen();   printf("done\n");
   printf("Generating cipher vectors..."); fflush(stdout); cipher_gen(); printf("done\n");
   printf("Generating HMAC   vectors..."); fflush(stdout); hmac_gen();   printf("done\n");
#ifdef LTC_OMAC
   printf("Generating OMAC   vectors..."); fflush(stdout); omac_gen();   printf("done\n");
#endif
#ifdef LTC_PMAC
   printf("Generating PMAC   vectors..."); fflush(stdout); pmac_gen();   printf("done\n");
#endif
#ifdef LTC_EAX_MODE
   printf("Generating EAX    vectors..."); fflush(stdout); eax_gen();    printf("done\n");
#endif
#ifdef LTC_OCB_MODE
   printf("Generating OCB    vectors..."); fflush(stdout); ocb_gen();    printf("done\n");
#endif
#ifdef LTC_OCB3_MODE
   printf("Generating OCB3   vectors..."); fflush(stdout); ocb3_gen();   printf("done\n");
#endif
#ifdef LTC_CCM_MODE
   printf("Generating CCM    vectors..."); fflush(stdout); ccm_gen();    printf("done\n");
#endif
#ifdef LTC_GCM_MODE
   printf("Generating GCM    vectors..."); fflush(stdout); gcm_gen();    printf("done\n");
#endif
   printf("Generating BASE64 vectors..."); fflush(stdout); base64_gen(); printf("done\n");
   printf("Generating MATH   vectors..."); fflush(stdout); math_gen();   printf("done\n");
   printf("Generating ECC    vectors..."); fflush(stdout); ecc_gen();    printf("done\n");
#ifdef LTC_LRW_MODE
   printf("Generating LRW    vectors..."); fflush(stdout); lrw_gen();    printf("done\n");
#endif
   return 0;
}
int main(void)
{
   reg_algs();
   printf("Generating hash   vectors..."); fflush(stdout); hash_gen(); printf("done\n");
   printf("Generating cipher vectors..."); fflush(stdout); cipher_gen(); printf("done\n");
   printf("Generating HMAC   vectors..."); fflush(stdout); hmac_gen(); printf("done\n");
   printf("Generating OMAC   vectors..."); fflush(stdout); omac_gen(); printf("done\n");
   printf("Generating PMAC   vectors..."); fflush(stdout); pmac_gen(); printf("done\n");
   printf("Generating EAX    vectors..."); fflush(stdout); eax_gen(); printf("done\n");
   printf("Generating OCB    vectors..."); fflush(stdout); ocb_gen(); printf("done\n");
   printf("Generating CCM    vectors..."); fflush(stdout); ccm_gen(); printf("done\n");
   printf("Generating GCM    vectors..."); fflush(stdout); gcm_gen(); printf("done\n");
   printf("Generating BASE64 vectors..."); fflush(stdout); base64_gen(); printf("done\n");
   return 0;
}