Share your repls and programming experiences

← Back to all posts
Caesar's Cipher Reimagined: An Encryption/Decryption Program!
annieva2 (3)

This repl is a Python project that encrypts and decrypts messages for the user.

This repl was created based on Caesar's Cipher.

Caesar's Cipher was an early type of encryption that "rotated" all of the letters of a message a certain direction using a key. For example, the message "test" with a key of 3 would become whvw.

All you have to do to get your own encrypted message is press "c" and follow the instructions on the screen! To decrypt, press "d" and follow the instructions on the screen.

What makes this project different is that, instead of changing all of the letters in the message by the same increment, each character has its own unique key by which it is shifted. For example, test would be encrypted with a key of 6948 would be znw2.

If you want to check out the repl in Apps, click Here.

Enjoy!

Please comment if you enjoyed this program or found any bugs!

Comments
hotnewtop
annieva2 (3)

Also, please comment if you find any thrown errors or if you have any suggestions to improve this repl!

RahulChoubey1 (186)

@annieva2 it's super easy to crash. If the key is non-numeric, it breaks. Perhaps set up something to catch these types of errors.

annieva2 (3)

@RahulChoubey1 Could you please specify what you mean? All of the keys are numeric. Are you perhaps using special characters that aren't supported?

annieva2 (3)

@RahulChoubey1 I just reran the program using spaces, numbers, and capital/lowercase letters and everything ran fine. Would you mind sending a screenshot of the issue?

annieva2 (3)

@RahulChoubey1 Oh! You are typing in the wrong value there. The numeric key goes in that slot, ex. 15551135421. The encrypted message goes in the next prompted statement.
The program asks for the key, ex. 123452132,
Then, the program asks for the message, ex. goanfkandf.

You just switched the two values. Don't worry, you pointing that out made me realize that I should add error handling, stay tuned for an update! Thanks!

EDIT: I added error handling

RahulChoubey1 (186)

@annieva2 I purposefully crashed it to pentest. Good program, by the way!