Написан на C: Code: #include <stdio.h> main(int argc, char *argv[]) { //char key[100],fname[100],ename[100]; unsigned char key[100],fname[100],ename[100]; FILE *fpi,*fpo,*fopen(); int kkk[100]; int i,j,k,c,p,pw_len,fn_len; printf("\n ** File encryption/decryption program **\n\n"); printf(" This program will take a password and filename ending in .E\n"); printf(" and will decrypt the file to a file with the .E suffix removed.\n"); printf(" If given a filename not ending in .E it will encrypt the file.\n"); if(argc == 1) { printf("\nEnter the password: "); fgets(key,100,stdin); // Need to strip off the EOL pw_len=strlen(key); key[pw_len-1]='\0'; printf("\nEnter the filename: "); fgets(fname,100,stdin); fn_len=strlen(fname); fname[fn_len-1]='\0'; } else if(argc == 3) { strcpy(key,argv[1]); strcpy(fname,argv[2]); } else { printf("\n ** Error!: Usage is %s <password> <filename>\n", argv[0]); exit(1); } pw_len=strlen(key)-1; for(i=0;i<pw_len;i++) { kkk[i]=(int)key[i]; } fn_len=strlen(fname); if (fname[fn_len-2]=='.' && fname[fn_len-1]=='E') // Decrypt mode { //strncpy(ename,fname,(fn_len-3)); strcpy(ename,fname); ename[fn_len-2]='\0'; printf("\nThe output file will be named: %s\n",ename); } else{ //Encrypt mode strncpy(ename,fname,fn_len); ename[fn_len]='.'; ename[fn_len+1]='E'; ename[fn_len+2]='\0'; printf("\nThe output file will be named: %s\n",ename); } if((fpi=fopen(fname,"r"))==NULL) { printf("\nError - file %s not found",fname); exit(1); } if((fpo=fopen(ename,"w"))==NULL) { printf("\nError - file %s not opened",ename); exit(1); } j=0; while((c = getc(fpi)) != EOF) { if(j == pw_len) j=0; p=c^kkk[j]; putc(p,fpo); j++; } } Бинарники Win/Linux и исходник: https://yadi.sk/d/fyGGv2FM1ZCy5Q Неплохо было написать еще и брут для него.