-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Description
What would you like to Propose?
Add a new cipher implementation- PermutationCipher.java, along with unit tests.
I propose adding a Permutation Cipher class that performs encryption and decryption by rearranging characters of plaintext according to a fixed permutation key. This cipher is a simple transposition cipher useful for demonstrating permutation-based encryption logic.
The implementation will include:
PermutationCipher.java: core class implementing encrypt/decrypt methods.
PermutationCipherTest.java: JUnit 5 test cases to verify correctness.
Issue details
Implement a cipher that encrypts text by rearranging the positions of letters based on a key permutation. For example, using key {3, 1, 2}, plaintext "HELLO" is divided into blocks of 3, and letters are permuted to produce ciphertext.
Enhancements Proposed:
- Add PermutationCipher.java implementing the algorithm.
- Add PermutationCipherTest.java with unit tests for encryption/decryption.
- Include padding for incomplete blocks.
Additional Information
No response