This is the part of the code I need help with -
include <stdlib.h>
include <time.h>
include <stdio.h>
include "aes.h"
void encrypt(const char *fileIn, const char *fileOut,
const unsigned char *key);
void decrypt(const char *fileIn, const char *fileOut,
const unsigned char *key);
int main()
{
const unsigned char key[] = "my key";
srand(time(NULL));
aes_init();
encrypt( "main.c", "main.c.encrypted", key);
decrypt("main.c.encrypted", "main.c.decrypted", key);
return 0;
}
Right now, what I do is, every time before running the program is... I go to the code and change the name of the file like..
encrypt("main.c", "main.c.encrypted", key);
decrypt("main.c.encrypted", "main.c.decrypted", key);
or
encrypt("trial.doc", "trial.doc.encrypted", key);
decrypt("trial.doc.encrypted", "trial.doc.decrypted", key);
However, I would like for the user to be able to enter these file names when the program is run.
HOW CAN I DO THAT?