summaryrefslogtreecommitdiff
path: root/idea.c
diff options
context:
space:
mode:
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;
}