From 2672a46218139fc5cbb4844096da451f7e243849 Mon Sep 17 00:00:00 2001 From: Benedict Date: Tue, 1 Mar 2016 21:56:15 +0100 Subject: set 1, challenge 3 completed --- task1_hex_to_base64.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 5 deletions(-) (limited to 'task1_hex_to_base64.c') diff --git a/task1_hex_to_base64.c b/task1_hex_to_base64.c index 9871055..40c0a94 100644 --- a/task1_hex_to_base64.c +++ b/task1_hex_to_base64.c @@ -1,6 +1,7 @@ #include #include #include +#include static const unsigned char base64_encode[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" @@ -135,7 +136,7 @@ void two_char_hex(char *start, char *result) *result = *result | second; } -int convert_hex_string_to_binary(char *encode, char* result) +int convert_hex_string_to_character_string(char *encode, char* result) { int i; int length = strlen(encode); @@ -177,6 +178,19 @@ void xor_string(char *str1, char* str2, char *result, int length) { return; } + + +void xor_string_single_byte(char byte, char* string, char *result, int length) { + int i; + + for(i=0;i 30) + printf("char: %c, score: %i, string: %s\n", (char) i, score, __xor_string); + } + } } -- cgit v1.2.3-70-g09d2