I am working on a program to decode an encrypted file. The problem is an error I continue to get on line 29, I have it noted. I am not sure if this is the reason the plain2.txt file is empty. It creates the file, but it's a blank page.
In the future, note the difference between an error and a warning. They're different, that's why they have different names.
A problem I see with this is that there's no guarantee that what gets encoded will get decoded exactly. For example, suppose I ask you take the number 856434569798 and add 1 to each digit, while leaving the 9s untouched.
856434569798
becomes
967545679899
And when you reverse,
956434569799
it's not the same number anymore.
This might be what's happening here, although I'm not sure if it accounts for the blank file.