summaryrefslogtreecommitdiff
path: root/task2.c
diff options
context:
space:
mode:
authorBenedict <benedict@0xb8000.de>2017-02-21 12:52:02 +0100
committerBenedict <benedict@0xb8000.de>2017-02-21 13:00:25 +0100
commitddce9b2d44ab48fc566870c5155b39c8fc06f24d (patch)
tree61e6f8d636190ef19f75bfd9cd8e4861ee04cf4f /task2.c
parentf71df313c4480fb3edd91edb572d8013bec6d352 (diff)
moved files of set1 into subdir
Diffstat (limited to 'task2.c')
-rw-r--r--task2.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/task2.c b/task2.c
deleted file mode 100644
index 1847103..0000000
--- a/task2.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "lib.h"
-
-
-int main(int argc, char**argv)
-{
- if (argc != 3)
- return 1;
-
- int length_arg_1 = strlen(argv[1]);
- int length_arg_2 = strlen(argv[2]);
- char *xor_string_tmp = malloc(length_arg_1+1);
- char *result = malloc(length_arg_1*2+1);
- char *str1 = malloc(length_arg_1+1);
- char *str2 = malloc(length_arg_2+1);
-
- decode_hex_string(argv[1], str1);
- decode_hex_string(argv[2], str2);
- xor_string(str1, str2, xor_string_tmp, length_arg_2, length_arg_1);
- hex_binary_to_string(xor_string_tmp, result, (length_arg_1/2));
- printf("%s\n", result);
-
- free(xor_string_tmp);
- free(result);
- free(str1);
- free(str2);
-
- return 0;
-}