blob: 072156a310f0041cf0a0b38d293dc1a407c3f352 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
}
|