diff options
| author | Benedict <benedict@0xb8000.de> | 2016-03-19 13:44:55 +0100 |
|---|---|---|
| committer | Benedict <benedict@0xb8000.de> | 2017-02-21 13:00:24 +0100 |
| commit | 4a9770b8ba9d86db12779f5ae00366bce60a42ad (patch) | |
| tree | 760dee07368fa25141e2467d21128486f5e5e7f8 /task5.c | |
| parent | 236d0ee8acedc2535a4a973acd99a708b530a053 (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } |
