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(b'key')
>>> cipher = arc4.encrypt(b'some plain text to encrypt')
Because RC4 is a stream cipher, you must initialize RC4 object in the beginning of each operations.
>>> arc4 = ARC4(b'key')
>>> arc4.decrypt(cipher)
b'some plain text to encrypt'
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
File details
Details for the file arc4-0.3.0.tar.gz
.
File metadata
- Download URL: arc4-0.3.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeccd1c42e9d7f2fc336bafa90503ab2cd8a1beeda5d71c1134a2c1163ba9dce |
|
MD5 | 8e6c78ebef077d67c930f4e14c21388a |
|
BLAKE2b-256 | f5aa14554852852fa32e681ad470344a7ff4cdde93245bbdb6c452fe7111a97e |
File details
Details for the file arc4-0.3.0-pp38-pypy38_pp73-win_amd64.whl
.
File metadata
- Download URL: arc4-0.3.0-pp38-pypy38_pp73-win_amd64.whl
- Upload date:
- Size: 10.2 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2196ccf8823a7dcd4d89d30249d9c5de740846d85d0fcb4566124f3ad9b6f7f1 |
|
MD5 | 6f54fd50d849705ba2c85e712d1d8112 |
|
BLAKE2b-256 | 0a01fc0d2c28dbb34409aa7c5201c1e0574dfbc16dc9d693a74e7447ed68d429 |
File details
Details for the file arc4-0.3.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.5 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86d74a47687d848475cc1fabf2af926ef282e857147b910193f4060e5da2e651 |
|
MD5 | dabedd54d0e2b1387cad8eb5f1d07838 |
|
BLAKE2b-256 | 3227033d57fd1c0b40fa9d94442fa47282daafd5dc3988b204c23ca7d93a9c8f |
File details
Details for the file arc4-0.3.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 6.6 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1958a1635bc5ad0aa0e84762dc76e0cf1b75e9784eb9517731b11f3e143b0c0d |
|
MD5 | fd7faf8b57a3c83ee8fdeaa655e8e988 |
|
BLAKE2b-256 | f2dbc2d96e8b6efde56969330c9f4fc54cb42bb4cfac5125b1103838314b80d9 |
File details
Details for the file arc4-0.3.0-pp37-pypy37_pp73-win_amd64.whl
.
File metadata
- Download URL: arc4-0.3.0-pp37-pypy37_pp73-win_amd64.whl
- Upload date:
- Size: 10.2 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17d4609e782e4bd6badd475091f5f12680cbaad62d0381b2d015de7bb3a5e321 |
|
MD5 | a2c9f258e787724b216d3a1658bf241f |
|
BLAKE2b-256 | f35a5a3459efb8092b1f3ec3fb69b73445591ddfaf9f5803bd81c5100ec07728 |
File details
Details for the file arc4-0.3.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.5 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 309b0c5ad9692a271f405787bde274a18a11a474cbacc9decda437a48c6274d5 |
|
MD5 | c752a8765cf15a0adb1b17e40116162e |
|
BLAKE2b-256 | f651f2ab16a8284ec7605f9e7a189afed19e1bb1c87db64d76b292f838b9cbec |
File details
Details for the file arc4-0.3.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 6.6 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7142c6b847fb9521787c63ae372571c224df90ac70eb00651c3cc3b655b4577a |
|
MD5 | dd538007d2a65741fd334a2c5584bfba |
|
BLAKE2b-256 | 02c67f15570cb424527971cf7edd0cbc9470b73fe192da5acb23bc94a66ad52d |
File details
Details for the file arc4-0.3.0-pp27-pypy_73-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-pp27-pypy_73-macosx_10_7_x86_64.whl
- Upload date:
- Size: 6.7 kB
- Tags: PyPy, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 486a851aac032d186dee25745496b389b1ee792e03fa6f149acecc058e4863ad |
|
MD5 | b8d294f69c360507854321c733d90ee2 |
|
BLAKE2b-256 | 2ddc28a587bb334f1ef9e19c9bee4ec45feea0b6f3feca556c091cecdc3d2de5 |
File details
Details for the file arc4-0.3.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 9.8 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccb2e898e94aed5c2618e8abc4414531dd2af22458d531b38038bdc31adc25b6 |
|
MD5 | 4bff660ccbfd7db360ee05e30dc11527 |
|
BLAKE2b-256 | 15a2069ee11459ff8f3ed8254f0144ee0582203ad655c37ecab815759a2165f3 |
File details
Details for the file arc4-0.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 19.8 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1844cfe6c3573a9b9b563311e1c41ddb1291d45456525b86b537a70d2e256b4d |
|
MD5 | 583300271c22a821ba9dc724681c2a77 |
|
BLAKE2b-256 | 4cb775e3edd3db0e74353a6837c3d85fd6856654e0c493e3beb63b0c5ab4e3b5 |
File details
Details for the file arc4-0.3.0-cp310-cp310-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp310-cp310-macosx_10_15_x86_64.whl
- Upload date:
- Size: 6.7 kB
- Tags: CPython 3.10, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f51499e1748e8b4a817c87d4b67b1be7723dad089b2bd274069401b8367603fa |
|
MD5 | b60a47a045c036768b3dd3c8e0367d79 |
|
BLAKE2b-256 | 3a67e649f68250ad3b344067844d595900a2ea8e9847ff77f34853ebe5e70170 |
File details
Details for the file arc4-0.3.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 10.1 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b65b98b319dfb7984b062bd9cf1b482e63d9f5915fee7dd67886f8c2bcd9105 |
|
MD5 | d2eec52ca8a488963b6bf5694d3864aa |
|
BLAKE2b-256 | e515d30af88bcd61ced8798d475e9c0bfdc427d07780781714619f7587e47d5d |
File details
Details for the file arc4-0.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 19.7 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e99beb05c525a43d2d80d6abf2526f6352505f1aa3109341692f944529f380a |
|
MD5 | 21d9c87c4f1da277b81972323b12e6cc |
|
BLAKE2b-256 | 0d07233043b9faeb79fb90cf371f2a983ed7b6e29c41c0e1f0d7c471b6378460 |
File details
Details for the file arc4-0.3.0-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 6.8 kB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b44529f4372f93f9ee1ca7158ba7314e236999bdf44fae0bc05f166dbb53f50 |
|
MD5 | c673bc2d7682670991ca69575c42e200 |
|
BLAKE2b-256 | f416c993507cee121bfae7e8a62bfe6a5fcffa33849dc84f879f144d3b7c1bb1 |
File details
Details for the file arc4-0.3.0-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 10.1 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 095adcb9082de64c8f964dcbd0093f843aa27a30751349a202347109431fcd7e |
|
MD5 | c396c588b4be8c873e6904530ef8051c |
|
BLAKE2b-256 | ec4d44a0d093d005e8afbd584e93bb459877fd4ef59fc97ca53b8a1897440a1f |
File details
Details for the file arc4-0.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 19.9 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc9a1f3be5f22e11cad2f93cef88ee9f17686dfef0617230e266480553874bb0 |
|
MD5 | 619af313fdd09ec951a3befe85027a2b |
|
BLAKE2b-256 | 4e169a37575fbf765dca256f0cd2488d493efca7117296e60553fa5742030ebf |
File details
Details for the file arc4-0.3.0-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 6.8 kB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 433bcd51597f0a2caf4d743c3719bcdd415a9e74f5c359561052c6b6b4683014 |
|
MD5 | 5e631dc4b4879d037d3ee1817c90cd09 |
|
BLAKE2b-256 | dfbb7b42f08b8890e0d47d6f219f8dd53576bb824ee455612103c7b617e4c661 |
File details
Details for the file arc4-0.3.0-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 10.0 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c0aeba9f0ddfa466c25364e81906c44afe420701839cc42f45200c3d198965e |
|
MD5 | 8f13ca1310f8f4c25734013c7f7a7ac5 |
|
BLAKE2b-256 | 666d5ac1a49947f6cea8df6dd8e7733a5a1ec4f273bc5e2424cc94801383e5f0 |
File details
Details for the file arc4-0.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 20.7 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dea8eb2fc67d79a05b54fd53b4966ab7b111fba7d3ca9fa529949893208745c |
|
MD5 | 0ef8601c0538fbf7049ebdbaf95ce3ba |
|
BLAKE2b-256 | 05157374ff32f2ea2b4a84d2de6ba996405da8104d2130934646302fb868e8ea |
File details
Details for the file arc4-0.3.0-cp37-cp37m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 6.8 kB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 469065fc9e205d58d2f5c4a22ca72965d7cd9ee38f2c7e8a5e9e8fb33a2576c1 |
|
MD5 | adf05040c7a0ace318f91bff7a871d97 |
|
BLAKE2b-256 | 9cb23b217a79c9a471d2be32f7f415128e6bb090e63205ed5044b43e14f52210 |
File details
Details for the file arc4-0.3.0-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 10.0 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cff508c097f6136772bcfbd814f6c570915b8e2e69f4645331940150a4050f44 |
|
MD5 | 843df1ef72462ec4a88000206fa3117b |
|
BLAKE2b-256 | 5700ea7f1246bebaa2c9b6bcda957b439ac4800557bcbb80052d8e2ffc514856 |
File details
Details for the file arc4-0.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 19.8 kB
- Tags: CPython 3.6m, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eed7c82897de0eed3c40f0a3518ff8a355d186fbaef30d77557259d472d18422 |
|
MD5 | b6342cc0994ecdd94813622edaaf7b23 |
|
BLAKE2b-256 | 10abbf00c1438d6de81033676ad21327ec5480d5d720fec01a600b0e9d0288a4 |
File details
Details for the file arc4-0.3.0-cp36-cp36m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp36-cp36m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 6.7 kB
- Tags: CPython 3.6m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93dc5bc5fa183c2d8857887a48a6a5602e01a31eebb3010b311a28faf8e106e3 |
|
MD5 | f672ba074368399a6b75d72b6b5ccc49 |
|
BLAKE2b-256 | abf7fa6675a914c604336991eff179f8ab9ebe5be0c7d159d206dbd1aa8e3afb |
File details
Details for the file arc4-0.3.0-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 10.0 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce4dcca641435356031924c286bf947ec3ea904dfedc628ecfdad0e30eec5a92 |
|
MD5 | c0adab54d1dc010c10f1398ea9801a4e |
|
BLAKE2b-256 | e48d80ce229a84387111d187655a1828ae99a6766e3ca83b4ec7fa3c6b6aa766 |
File details
Details for the file arc4-0.3.0-cp35-cp35m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp35-cp35m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 6.7 kB
- Tags: CPython 3.5m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a62d6aeacb3bf34305e666115516bfa5560f898318ffcd3ead5be487253f86c |
|
MD5 | cd4cc6660e7a1ee0022eec4c663c8444 |
|
BLAKE2b-256 | 6267134e2f93226c319fd44fbaac05218d7cc95d037a0a351f108621a0b0f050 |
File details
Details for the file arc4-0.3.0-cp27-cp27m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: arc4-0.3.0-cp27-cp27m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 6.6 kB
- Tags: CPython 2.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0217e81e7796ad7ab2cee5396f3e57f9988f9c1560b1e7476e65995b84f754e |
|
MD5 | 96482c4ac5920e0fe7a9600fef9fb2cf |
|
BLAKE2b-256 | 241680da86cfd2ea8c05252ac466d8d5bde4264a0db873913b56dc21e9f510e3 |