I am trying to understand how to use ARC4 encryption algorithm (just for educational purposes, I know it's not secure anymore), and I seem to be able to encrypt text but not decrypt it. Here is the very basic code:
from Crypto.Cipher import ARC4
key = '#KCMDDC51#-890'
cipher = ARC4.new(key)
crypted = cipher.encrypt('wha frjcnvnb')
print(crypted)
notEncrypted = cipher.decrypt(crypted)
print(notEncrypted)
now, the encryption part outputs the following: b'\x82J\x96~r\x9e\xe2\xd7G\xa5Jz\xba'
but the decryption part doesn't output normal text, but this other jumbled up thing: b'qI\xa7\x97\xb7\x94XQ\x8a\xb1iu\xc1'.
why?