aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark/blowfish.c
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2024-04-22 00:35:53 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2024-04-22 00:35:53 -0300
commit5f01c706267c595de92406a32e7f31ef5056c2d0 (patch)
treed1e74ef54efc41ada622900fe3e2a50dee44a237 /modules/benchmark/blowfish.c
parent09fcc751ef158898c315ebc9299a0fa3a722d914 (diff)
New upstream version 2.0.3preupstream/2.0.3pre
Diffstat (limited to 'modules/benchmark/blowfish.c')
-rw-r--r--modules/benchmark/blowfish.c45
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);
-}