diff options
Diffstat (limited to 'modules/benchmark/blowfish.c')
-rw-r--r-- | modules/benchmark/blowfish.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/modules/benchmark/blowfish.c b/modules/benchmark/blowfish.c index 2aa11a2a..f8d2e14a 100644 --- a/modules/benchmark/blowfish.c +++ b/modules/benchmark/blowfish.c @@ -491,48 +491,3 @@ void Blowfish_Init(BLOWFISH_CTX * ctx, unsigned char *key, int keyLen) } } } - -static gpointer -parallel_blowfish(unsigned int start, unsigned int end, void *data, gint thread_number) -{ - BLOWFISH_CTX ctx; - unsigned int i; - unsigned long L, R; - - L = 0xBEBACAFE; - R = 0xDEADBEEF; - - for (i = start; i <= end; i++) { - Blowfish_Init(&ctx, (unsigned char*)data, 65536); - Blowfish_Encrypt(&ctx, &L, &R); - Blowfish_Decrypt(&ctx, &L, &R); - } - - return NULL; -} - -void -benchmark_fish(void) -{ - bench_value r = EMPTY_BENCH_VALUE; - - gchar *tmpsrc; - gchar *bdata_path; - - bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL); - if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) { - bench_results[BENCHMARK_BLOWFISH] = r; - g_free(bdata_path); - return; - } - - shell_view_set_enabled(FALSE); - shell_status_update("Performing Blowfish benchmark..."); - - r = benchmark_parallel_for(0, 0, 50000, parallel_blowfish, tmpsrc); - r.result = r.elapsed_time; - - bench_results[BENCHMARK_BLOWFISH] = r; - g_free(bdata_path); - g_free(tmpsrc); -} |