diff options
Diffstat (limited to 'idea.c')
-rw-r--r-- | idea.c | 17 |
1 files changed, 1 insertions, 16 deletions
@@ -62,7 +62,6 @@ static void cipher_idea(uint16_t in[4], uint16_t out[4], IDEAkey Z); double DoIDEA(void) { - const char* context = "CPU:IDEA"; unsigned char* plain1 = NULL; /* First plaintext buffer */ unsigned char* crypt1 = NULL; /* Encryption buffer */ unsigned char* plain2 = NULL; /* Second plaintext buffer */ @@ -100,25 +99,11 @@ DoIDEA(void) ** Also, fill up plain1 with sample text. */ plain1 = malloc(ARRAY_SIZE); - if (!plain1) { - fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context); - exit(1); - } crypt1 = malloc(ARRAY_SIZE); - if (!crypt1) { - fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context); - free(plain1); - exit(1); - } plain2 = malloc(ARRAY_SIZE); - if (!plain2) { - fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context); - free(plain1); - free(plain2); - exit(1); - } + /* ** Note that we build the "plaintext" by simply loading ** the array up with random numbers. |