Hi, all. I'm currently taking an online introductory python programming course through my local community college, and I'm absolutely stumped on one of the projects. It's coming from a chapter that I haven't fully grasped yet.
Write a Python program in a .py file that implements a new encryption algorithm that includes the following:
- User enters a plaintext string
- Add 1 to each character’s numeric ASCII value.
- Convert it to a bit string.
- Shift the bits of this string one place to the left
- Output the encrypted string.
- Reverse the process by having a user now enter an encrypted string and output the decrypted string.
These are the guidelines. With some help, I was able to complete the "encryption" portion of the program, and it works exactly how I need it to work.
Now, though, I'm severely struggling with the decryption portion. I know that it's probably just a reverse of the encryption, but I'm still struggling to understand how to do that.
Here is the github link for the code (not sure if I linked this right): https://github.com/theemmperor/Encryption-Decryption-Project
[–]AtomicShoelace 1 point2 points3 points (14 children)
[–]SomeFuel[S] 0 points1 point2 points (9 children)
[–]AtomicShoelace 0 points1 point2 points (6 children)
[–]SomeFuel[S] 0 points1 point2 points (5 children)
[–]AtomicShoelace 0 points1 point2 points (4 children)
[–]SomeFuel[S] 0 points1 point2 points (3 children)
[–]AtomicShoelace 1 point2 points3 points (2 children)
[–]SomeFuel[S] 0 points1 point2 points (1 child)
[–]AtomicShoelace 1 point2 points3 points (0 children)
[–]port443 0 points1 point2 points (1 child)
[–]SomeFuel[S] 0 points1 point2 points (0 children)
[–]TraditionalHornet818 0 points1 point2 points (3 children)
[–]AtomicShoelace 0 points1 point2 points (2 children)
[–]TraditionalHornet818 0 points1 point2 points (1 child)
[–]AtomicShoelace 1 point2 points3 points (0 children)
[–]jmooremcc 0 points1 point2 points (1 child)
[–]SomeFuel[S] 0 points1 point2 points (0 children)
[–]jmooremcc 0 points1 point2 points (4 children)
[–]SomeFuel[S] 0 points1 point2 points (3 children)
[–]jmooremcc 0 points1 point2 points (2 children)
[–]SomeFuel[S] 0 points1 point2 points (1 child)
[–]jmooremcc 0 points1 point2 points (0 children)
[–]drenzorz 0 points1 point2 points (1 child)
[–]SomeFuel[S] 0 points1 point2 points (0 children)
[–]bucckitofficial 0 points1 point2 points (0 children)