Implementation of the stream cipher - RC4 (Rivest Cipher 4)
From Wikipedia
The RC4 Encryption Algorithm, developed by Ronald Rivest of RSA, is a shared key stream cipher algorithm requiring a secure exchange of a shared key. The symmetric key algorithm is used identically for encryption and decryption such that the data stream is simply XORed with the generated key sequence.
Python 2 version
$ python2 rc4-2.py
$ python2 -m pytest rc4-2.py
Python 3 version
$ python3 rc4-3.py
$ python3 -m pytest rc4-3.py
MIT | Copyright (c) 2017 Manoj Pandey