Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playfair Cipher Solution - TypeScript #396

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Sajantoor
Copy link

This pull request introduces the Decryptor class, designed to decrypt messages encoded with the Playfair cipher. It outputs the decrypted text for IKEWENENXLNQLPZSLERUMRHEERYBOFNEINCHCV using the encryption key SUPERSPY and "X" as the padding character.

Main Features:

  • Decryptor Class: Core class responsible for decrypting messages.
  • Key Grid Generation: Creates a 5x5 grid based on the encryption key, omitting the letter 'J'. The positions of each character is hashed, allowing for O(1) look up for the position of characters. For long strings this provides a significant performacne improvement.
  • Decryption Logic: Handles decryption of letter pairs according to Playfair cipher rules.
  • Static Decrypt Method: Provides a convenient way to decrypt messages without instantiating the class.
  • Position interface: Easily represent positions of characters on the grid.

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.

None yet

1 participant