Skip to content

Conversation

@imShreya2007
Copy link

Changes Made

Fixed Caesar Cipher Implementation

  • Renamed class: Updated class name for better code clarity and convention
  • Added reverse key mapping: Implemented rev_key dictionary for proper decryption functionality
  • Fixed encrypt/decrypt behavior: Corrected the encryption and decryption logic to work bidirectionally
  • Code refactoring: Improved code structure and removed redundant lines (32 insertions, 34 deletions)
  • Updated README example: Fixed terminology and examples to match the corrected implementation

Technical Details

  • The cipher now properly creates a reverse mapping for decryption
  • Both encryption and decryption functions work correctly with the ROT3 Caesar cipher
  • Input validation remains intact for alphabetic characters only

Testing

  • ✅ Encryption works correctly
  • ✅ Decryption properly reverses encrypted text
  • ✅ Input validation prevents invalid characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant