summaryrefslogtreecommitdiff
path: root/task5.c
diff options
context:
space:
mode:
authorBenedict <benedict@0xb8000.de>2016-03-19 13:44:55 +0100
committerBenedict <benedict@0xb8000.de>2017-02-21 13:00:24 +0100
commit4a9770b8ba9d86db12779f5ae00366bce60a42ad (patch)
tree760dee07368fa25141e2467d21128486f5e5e7f8 /task5.c
parent236d0ee8acedc2535a4a973acd99a708b530a053 (diff)
completed task6 nearly completly
just a few characters are still wrong in the key. freqencies analysis has to be made more comprehensive
Diffstat (limited to 'task5.c')
-rw-r--r--task5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/task5.c b/task5.c
index f110e30..15e4568 100644
--- a/task5.c
+++ b/task5.c
@@ -3,13 +3,13 @@
/*
* implements task 5 of set 1 of matanso challange
*/
-void main()
+int main()
{
char *stanze = "Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal";
char *result = malloc(strlen(stanze));
- char *printable = malloc(strlen(stanze)*5);
+ char *printable = malloc(strlen(stanze)*2+1);
xor_string(stanze, "ICE", result, 3, strlen(stanze));
- hex_binary_to_string(result, printable, 2*strlen(stanze));
+ hex_binary_to_string(result, printable, strlen(stanze));
printf("%s\n", printable);
}