diff options
| author | Benedict <benedict@0xb8000.de> | 2016-03-04 10:54:20 +0100 |
|---|---|---|
| committer | Benedict <benedict@0xb8000.de> | 2017-02-21 13:00:24 +0100 |
| commit | d2e94cb263ab933103e1968c0f3da638f35f5983 (patch) | |
| tree | d61961b728f9adf9089dd5e766f3ec871538c8fe /task1.c | |
| parent | dc9285bbf119385428c5cc0f6eeace27ac909339 (diff) | |
added task 1 agian in new infrastrucre
also added a test for task1
Diffstat (limited to 'task1.c')
| -rw-r--r-- | task1.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,22 @@ +#include "lib.h" + + +int main(int argc, char **argv) +{ + if (argc != 2) + return 0; + + + char *result = malloc(strlen(argv[1])); + char *base64 = malloc(strlen(argv[1])); + + decode_hex_string(argv[1], result); + encode_to_base64(result, base64); + + printf("%s\n", base64); + + free(result); + free(base64); + return 0; + +} |
