ciphers.running_key_cipher¶
https://en.wikipedia.org/wiki/Running_key_cipher
Attributes¶
Functions¶
|
Decrypts the ciphertext using the Running Key Cipher. |
|
Encrypts the plaintext using the Running Key Cipher. |
|
Module Contents¶
- ciphers.running_key_cipher.running_key_decrypt(key: str, ciphertext: str) str ¶
Decrypts the ciphertext using the Running Key Cipher.
- Parameters:
key – The running key (long piece of text).
ciphertext – The ciphertext to be decrypted.
- Returns:
The plaintext.
- ciphers.running_key_cipher.running_key_encrypt(key: str, plaintext: str) str ¶
Encrypts the plaintext using the Running Key Cipher.
- Parameters:
key – The running key (long piece of text).
plaintext – The plaintext to be encrypted.
- Returns:
The ciphertext.
- ciphers.running_key_cipher.test_running_key_encrypt() None ¶
>>> key = "How does the duck know that? said Victor" >>> ciphertext = running_key_encrypt(key, "DEFEND THIS") >>> running_key_decrypt(key, ciphertext) == "DEFENDTHIS" True
- ciphers.running_key_cipher.plaintext¶