We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b12b7b commit 8123db2Copy full SHA for 8123db2
1 file changed
ciphers/rc4_cipher.py
@@ -165,12 +165,12 @@ def decrypt(ciphertext: list[int], key: str) -> str:
165
166
# Example usage
167
message = "Hello, World!"
168
- secret_key = "mysecretkey"
+ key = "mysecretkey"
169
170
print(f"Original : {message}")
171
- encrypted = encrypt(message, secret_key)
+ encrypted = encrypt(message, key)
172
print(f"Encrypted: {encrypted}")
173
- decrypted = decrypt(encrypted, secret_key)
+ decrypted = decrypt(encrypted, key)
174
print(f"Decrypted: {decrypted}")
175
- assert decrypted == message, "Decryption failed — output does not match original."
+ assert decrypted == message, "Decryption failed - output does not match original."
176
print("Encrypt -> Decrypt round-trip successful.")
0 commit comments