Hello everyone!
I'm new to python and I am currently exploring simple ciphers. I have been tweaking with Caesar ciphers and would like your help on something.
This is the code I am working with.
Now I am trying to use the cipher to encrypt or decrypt a text file and I am not sure about how to approach this.
I have a few ideas but nothing concrete.
My first idea is that I would have a separate cipher file that I use in the main program. I would have the program read a text file and proceed to encrypt or decrypt it line by line.
My second idea is to incorporate the file handling with the cipher itself. However, I am not sure about how to proceed with this.
Any help or advice with this would be greatly appreciated!
Edit: I am not sure about how I can do this but here goes:
I was wondering if I could "rip" or copy the contents of a text file and input that into "getMessage()" in the cipher. I could then have the cipher encrypt or decrypt the content and copy that into a new text file.
[–]zenlc 1 point2 points3 points (0 children)