diff options
Diffstat (limited to 'set3/task18.c')
| -rw-r--r-- | set3/task18.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/set3/task18.c b/set3/task18.c new file mode 100644 index 0000000..072156a --- /dev/null +++ b/set3/task18.c @@ -0,0 +1,20 @@ +#include "../lib/lib.h" +#include "../lib/lib2.h" +#include "../lib/lib3.h" +#include <time.h> + +int main() +{ + char *file; + int length_file = read_base64_file("task18.txt", &file); + char *ciphertext = malloc(length_file); + int length = decode_base64(file, ciphertext); + + char *decrypted = malloc(length); + char *key = "YELLOW SUBMARINE"; + char nonce[16]; + memset(nonce, 0, 16); + aes_ctr(ciphertext, length, decrypted, key, nonce); + + printf("plaintext: %s\n", decrypted); +} |
