A small and insanely fast ARCFOUR (RC4) cipher implementation of Python
Project description
A small and insanely fast ARCFOUR (RC4) cipher implementation of Python.
Strongly focused on performance; entire source code is written in C.
Thread-safety; you can improve further performance with multi-threading.
Easily installable; single file with no dependency, pre-built wheels provided.
Benchmark
Below is benchmark metrics against 3 major RC4 implementations.
The whole benchmark code is in ./benchmark.py.
Install
Install from PyPI
pip install arc4
Or clone the repo and do install
git clone https://github.com/manicmaniac/arc4.git
cd arc4
python setup.py install
Usage
from arc4 import ARC4
arc4 = ARC4('key')
cipher = arc4.encrypt('some plain text to encrypt')
Because RC4 is a stream cipher, you must initialize RC4 object in the beginning of each operations.
arc4 = ARC4('key')
arc4.decrypt(cipher)
Documents
Here is the API reference.
Testing
python -m unittest discover
License
This software is under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for arc4-0.1.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcc4125e284826b43201e77ac8035a0dc60f58ca74f296fdc377456bc7640e1b |
|
MD5 | cfe01aae57c8f2ed94997c28c2dea6cd |
|
BLAKE2b-256 | 08372a6535995b1c055baa7f3b2cc2df0768cdd495a2e8808951288c1210e07f |
Hashes for arc4-0.1.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bf80a4d3686c7412ddac2390550ef108c68c5a3f66f76a830873c94698a2094 |
|
MD5 | 5194b6b8aa0088b8f75d4de56c5705b9 |
|
BLAKE2b-256 | e73f83a5b621a4d0dac4229c816aa27374638c2f1051f17cad4b25a1b2373cb2 |
Hashes for arc4-0.1.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5b80e4132d1648bc6d44aedd92c044996a6152602e50d704b633f7c9476e99e |
|
MD5 | 60c31daaf075c6473d954d6b86a868b2 |
|
BLAKE2b-256 | 7f46a9c3c9b1d9cbe4331fbe2ecee005a7ddfcd6617881def201e3cad4689afc |
Hashes for arc4-0.1.0-pp37-pypy37_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ace1aabf3c426149908615d030bbefd5b34d2bb46037af4eda7594e077ee7dd |
|
MD5 | 57343680839999c9959805dce4f6c128 |
|
BLAKE2b-256 | 7fa31353eb19619f1f705e16354c13033202f5d31e63f2e6bb9f21ef799954d3 |
Hashes for arc4-0.1.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba582e47aed7a851f9c7d500d54b7174c5b293e8466b2e731acb89d0811f5775 |
|
MD5 | 0397885bc5c17d269edfba077c18c873 |
|
BLAKE2b-256 | f2eb541f5f7ab7ce67ac6c3cf10aeb329d32bfc705ad7dc7b9000daed0f3b97d |
Hashes for arc4-0.1.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 895b2af5ef9059675bfff6206eaf706cae3e8762032c7a911a0ae461135feaf9 |
|
MD5 | 438c5277975f3b92e9ee172b19f43dbb |
|
BLAKE2b-256 | 386bbb318ed3482b4fa54fc6cce86d610a92b19f3a8cc8d79c2b57877665766c |
Hashes for arc4-0.1.0-pp27-pypy_73-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dc79c8f0bc0b80b2fc85595f7ffac957aadc9eef73c85e894095644f89810d4 |
|
MD5 | 233e86cbf0fc78ef2cd0254abc03ee34 |
|
BLAKE2b-256 | ecb8a1976892f5d831cfa35dc8f8e28492c11fcc886eb27497fe7f1373850bb6 |
Hashes for arc4-0.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9141de40cbb9c442bc11e697712199af53eca478a7a6b468aad1d85762b9297 |
|
MD5 | 84a8a8b1a486ea23de8ed697b2bef0e9 |
|
BLAKE2b-256 | e8ad07f08906a8ad08fa709363a24a05c89101bf5780f2297f1b4a436f6378b1 |
Hashes for arc4-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca8e83b264a7d7e83d848cbddb8ffecf496e0a8ad1a96126f0b589b7b8588146 |
|
MD5 | 1a300ecf7324cbc705bacc23c19f2a9d |
|
BLAKE2b-256 | 6fb6740256033abd3e2c3a5463aacf5682552234e0a608e533ad35425346412e |
Hashes for arc4-0.1.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45b78f400887a968b197daf88f4acd738ad09e83904181b1e62c8e508a70c2fb |
|
MD5 | cf799422a7663de89799135464e6c3d9 |
|
BLAKE2b-256 | ada1f32945fae31ed9fe50ddfa60a9f9588ce64ff6373fe0778196e54d094c60 |
Hashes for arc4-0.1.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc295c9ebd002b87a309d83f44071ce96198dc4dffb84b989561d3ecad48bd2a |
|
MD5 | 603698713aec9edf6f80ab7784c64ff9 |
|
BLAKE2b-256 | 691f1f7e63a65e89152c1408f977c0d872f23917a12b829fac61a8260e462c39 |
Hashes for arc4-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 149c2aa6dd819b6016c3b05c593f599c725c50e0ef8a2aa63d41c2e5d0b2b783 |
|
MD5 | a788f7d5bf576cba34cddef139cd154b |
|
BLAKE2b-256 | b1bbaca6bdc291df69c8c7ba18e1939e1696287947542674b1324f6133d86d57 |
Hashes for arc4-0.1.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83037df4ee9bf94ac9c304513aad6a39a51a812835712d622d879d97a070932b |
|
MD5 | 7b2f9aaddc79fe17890e8e44d295de6f |
|
BLAKE2b-256 | 20ddbbc976b63fbb50fcf00317352a2e55f74c74f3f233b45ef65f3c5b2232fc |
Hashes for arc4-0.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e7058f9160ef2fd4126d2040a478fa47ffeba4925a929a2b9f5425ed36de299 |
|
MD5 | acdfa87d654586e5d18b6f5b292db1ea |
|
BLAKE2b-256 | 09a176a4a568281968213cb41f8eccce413341752223600779a15e8392e24abb |
Hashes for arc4-0.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6520b104fecd198030ad71b325bac04acb7d9ccc76fabee719abd1254fc085fa |
|
MD5 | 7c979b6595afc41a5d99a57fcc1dd511 |
|
BLAKE2b-256 | b0e512c6dc566405de8660541804ed90db7fd10de373dd0eea7e3feac6608728 |
Hashes for arc4-0.1.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5faa1fd61a7756325687de4285414c0f06c209e4692688ad860cd83b3ce0a355 |
|
MD5 | 28651159fb7397bd2a1f021e3397ad5e |
|
BLAKE2b-256 | dfc8859f433329712ec1f303e5aa332aca20dcc36ca2af113aa9f67b8f563ae1 |
Hashes for arc4-0.1.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f426e1d33af0c331ccfec063fa54a133b049968b48edff7a5c61182a810c2e29 |
|
MD5 | 0094655ce04bc9632a76cf094824c234 |
|
BLAKE2b-256 | 9cdbe7ad0ac49d2fe3c5130b6e58fcef35d2644cefd11f7a6d20d198a37c4d51 |
Hashes for arc4-0.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 495ee418dbebc0957ba0b15c177cf8346cf820b90b31d430c14a0e69b6bbb728 |
|
MD5 | 61b9ef2ea4032c08b52b8f406c80520b |
|
BLAKE2b-256 | d92fa8dbf8b400631f084da8c42f8689036b129d3ed9c3008d8c7ed59d187306 |
Hashes for arc4-0.1.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb7aa9736a49b759d302c7311cbc97a35669b6dcf77a2e3a40f74a3ab44fbe8b |
|
MD5 | 8223e728b79afcd5a524a2b9b16abe75 |
|
BLAKE2b-256 | cef8f8e40d4a322bdac2b929beb7ff86634de1a6cc47a459994a8359c91e2131 |
Hashes for arc4-0.1.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad703ed0b523399ae1131ce1710bd49f17ad1654ae0b10a4910803ac1e7e79e5 |
|
MD5 | 9a8662a11dfcc6fe505a9c21847e1e2a |
|
BLAKE2b-256 | 42e36284bdfeb74cb6e660dc5081fa1dea759ba044c160cc42534f91d5a7313c |
Hashes for arc4-0.1.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8674a7f2ffe96dae71b6622220c827eb0a64e688aebd21ae8a978e7b3e145c97 |
|
MD5 | ce3e74264cc9f833a82a6c26c476627a |
|
BLAKE2b-256 | 7c4a476039f044083e4a94a2f5bf150c0b889fd63d5d5e7e5d536511cb1597c7 |
Hashes for arc4-0.1.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 801a45bd99a0b339da9a6c21606b85a5448517dea2544e650a60b4fbe015c451 |
|
MD5 | 03817c0218d121c847fdc12fe6a5721b |
|
BLAKE2b-256 | 5d2500fb22fd5e7564aec63dd955cd93a939e281240d4301a4bf058c67e32fe9 |
Hashes for arc4-0.1.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03bd7411b9f073f13c8dff32b9fec5bb25cadd4fe23a47efc64595b8ea7b3991 |
|
MD5 | 14b0fa9ce58391dffa8df03ae7e7595b |
|
BLAKE2b-256 | bb4ba7188d00aef00b80541a8932d21969e4619375e2b2c6b6547c0d21fd75e5 |
Hashes for arc4-0.1.0-cp35-cp35m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82774464b7ca0274f3cbe5ab553ae8b6d07f18e7e46a2df9e9149a2cb8822ee0 |
|
MD5 | fbe130cee4fc8ae23061aefef8203ff5 |
|
BLAKE2b-256 | dc5ef1f8487f2fb0982973c95e801adbe3a58765e1b8f84fac2742bfe6445ccd |
Hashes for arc4-0.1.0-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4af176044c32592894314bbc601bd9fd5693086a739085407f1cbd6704bd5d |
|
MD5 | 8f67f27791d57e3c1c3b29ca7d7b8857 |
|
BLAKE2b-256 | 914b244b3593b13c01f375baafc728aa453bec6906017a8cc03d9c658e3eb065 |