Original Post
I encrypted a string of some characters, the file named "a" with one single key, and the file "b" with two different keys.
I have read the line below from a book and I would like to see if it is actually true and it really can be done so easily!
I have read the line below from a book and I would like to see if it is actually true and it really can be done so easily!
This kind of encryption is trivial to break, even without computers [587,1475]. It will only take a few seconds with a computer.[/quote]
void main (int argc, char *argv[])
{
FILE *fi, *fo;
char *cp;
int c;
if ((cp = argv[1]) && *cp!='\0') {
if ((fi = fopen(argv[2], “rb”)) != NULL) {
if ((fo = fopen(argv[3], “wb”)) != NULL) {
while ((c = getc(fi)) != EOF) {
if (!*cp) cp = argv[1];
c ^= *(cp++);
putc(c,fo);
}
fclose(fo);
}
fclose(fi);
}
}
}
If somebody can break the encryption on "b", I will give that individual something for their effort if they describe in detail how they broke the encryption (no cheats).
I'm trying to create a system in which i can rely on to be safe and that is the reason for all this.