Python
Python copied to clipboard
Add Gronsfeld cipher implementation
Describe your change:
This pull request adds new functionality to the ciphers/gronsfeld.py file by implementing the Gronsfeld cipher for both encryption and decryption. The main changes include the addition of two functions: gronsfeld_encrypt and gronsfeld_decrypt, along with an example usage section.
New functionality:
ciphers/gronsfeld.py: Added thegronsfeld_encryptfunction to encrypt plaintext using the Gronsfeld cipher.ciphers/gronsfeld.py: Added thegronsfeld_decryptfunction to decrypt ciphertext using the Gronsfeld cipher.
Example usage:
ciphers/gronsfeld.py: Included an example usage section to demonstrate how to use thegronsfeld_encryptandgronsfeld_decryptfunctions. This commit adds the implementation of the Gronsfeld cipher, which includes functions for encrypting and decrypting messages using a numeric key. Thegronsfeld_encryptfunction takes a plaintext message and a key as input and returns the encrypted message. Thegronsfeld_decryptfunction takes a ciphertext message and a key as input and returns the decrypted message. The implementation also includes an example usage section that demonstrates how to encrypt and decrypt a message using the Gronsfeld cipher.
Closes #11835
Contributions for the Hacktoberfest and will be working for other language that is for Javascript as well.
Closing tests_are_failing PRs to prepare for Hacktoberfest