summaryrefslogtreecommitdiff
path: root/idea.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-16 01:39:11 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-16 01:39:11 +0000
commit66428e7f5a40e36d0129200dcc53e9459e1d0a9b (patch)
tree23148c8f9b5f2d20672d6995c920e1d06d442874 /idea.c
parent0a0699aba70c04e3e6c5847b47cee75025e96255 (diff)
-- Remove getScore functions
-- Replace by making Do* functions return the results directly git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@61 0d43b9a7-5ab2-4d7b-af9d-f64450cef757
Diffstat (limited to 'idea.c')
-rw-r--r--idea.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/idea.c b/idea.c
index 0f97ddf..19d5faa 100644
--- a/idea.c
+++ b/idea.c
@@ -53,15 +53,13 @@ static void en_key_idea(uint16_t userkey[8], IDEAkey Z);
static void de_key_idea(IDEAkey Z, IDEAkey DK);
static void cipher_idea(uint16_t in[4], uint16_t out[4], IDEAkey Z);
-static double results;
-
/***********
** DoIDEA **
************
** Perform IDEA encryption. Note that we time encryption & decryption
** time as being a single loop.
*/
-void
+double
DoIDEA(void)
{
const char* context = "CPU:IDEA";
@@ -159,7 +157,7 @@ DoIDEA(void)
free(crypt1);
free(plain2);
- results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time;
+ return (double)(iterations * CLOCKS_PER_SEC) / (double)total_time;
}
/********************
@@ -379,11 +377,4 @@ MUL(x1,*Z++);
*out++=x2+*Z++;
MUL(x4,*Z);
*out=x4;
-return;
-}
-
-double
-getIDEAScore(void)
-{
- return results;
}