Great start! You could also try something like some sort of simple password key.
Example:
Code:
#include <cstdlib>
#include <cstdio>
#include <cstring>
#define BUF_SIZE 256
int main(void)
{
char buffer[BUF_SIZE];
std::puts("Password: ");
std::fgets(buffer, BUF_SIZE, stdin);
std::FILE *in, *out;
in = std::fopen("gonder", "rb");
out = std::fopen("yeni", "wb");
if(in && out)
{
int size = std::strlen(buffer), i = 0, ch;
while(!std::feof(in))
{
if((ch = std::fgetc(in)) != EOF)
std::putc(ch ^ buffer[i % size], out);
++i;
}
std::fclose(in);
std::fclose(out);
return 0;
}
if(in)
std::fclose(in);
if(out)
std::fclose(out);
return -1;
}
Just to maybe give you a nudge in the direction you are wishing to go.