summaryrefslogtreecommitdiff
path: root/set1/task5.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 /set1/task5.c
parentf71df313c4480fb3edd91edb572d8013bec6d352 (diff)
moved files of set1 into subdir
Diffstat (limited to 'set1/task5.c')
-rw-r--r--set1/task5.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/set1/task5.c b/set1/task5.c
new file mode 100644
index 0000000..2e4bdc1
--- /dev/null
+++ b/set1/task5.c
@@ -0,0 +1,15 @@
+#include "../lib/lib.h"
+
+/*
+ * implements task 5 of set 1 of matanso challange
+ */
+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)*2+1);
+ xor_string(stanze, "ICE", result, 3, strlen(stanze));
+ hex_binary_to_string(result, printable, strlen(stanze));
+ printf("%s\n", printable);
+}