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