summaryrefslogtreecommitdiff
path: root/idea.c
diff options
context:
space:
mode:
Diffstat (limited to 'idea.c')
-rw-r--r--idea.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/idea.c b/idea.c
index 391dbff..509f394 100644
--- a/idea.c
+++ b/idea.c
@@ -153,25 +153,25 @@ DoIDEA(void)
static clock_t
DoIDEAIteration(unsigned char *plain1, unsigned char *crypt1, unsigned char *plain2, unsigned long nloops, IDEAkey Z, IDEAkey DK)
{
- clock_t start, stop;
- register unsigned long i;
- register unsigned long j;
+ clock_t start, stop;
+ register unsigned long i;
+ register unsigned long j;
- start = clock();
+ start = clock();
- for (i = 0; i < nloops; i++) {
- for (j = 0; j < ARRAY_SIZE; j += sizeof(uint16_t) * 4) {
- cipher_idea((uint16_t *)(plain1 + j), (uint16_t *)(crypt1 + j), Z); /* Encrypt */
- }
- }
+ for (i = 0; i < nloops; i++) {
+ for (j = 0; j < ARRAY_SIZE; j += sizeof(uint16_t) * 4) {
+ cipher_idea((uint16_t *)(plain1 + j), (uint16_t *)(crypt1 + j), Z); /* Encrypt */
+ }
- for (j = 0; j < ARRAY_SIZE; j += sizeof(uint16_t) * 4) {
- cipher_idea((uint16_t *)(crypt1 + j), (uint16_t *)(plain2 + j), DK); /* Decrypt */
- }
+ for (j = 0; j < ARRAY_SIZE; j += sizeof(uint16_t) * 4) {
+ cipher_idea((uint16_t *)(crypt1 + j), (uint16_t *)(plain2 + j), DK); /* Decrypt */
+ }
+ }
- stop = clock();
+ stop = clock();
- return stop - start;
+ return stop - start;
}
/********