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.
Metadata
Release files for arc4 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| arc4-0.5.0.tar.gz | 6.6 kB | Without provenance | Details |
Built distributions (wheels)
Total release size: 232.8 kB
Release files / arc4-0.5.0.tar.gz
| Download URL | arc4-0.5.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
259d4e505766639b7245d7199f3b4e72134d7adf20196820ffd3015954d85955
|
|
BLAKE2b-256 checksum How to use checksums |
b6f0881da69973abadac6848d27a0bf070b107ed5547ddbd1b092c30ab4c8b7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-pp311-pypy311_pp73-win_amd64.whl
| Download URL | arc4-0.5.0-pp311-pypy311_pp73-win_amd64.whl |
|---|---|
| Size | 10.2 kB |
| Tags | PyPy 3.11 PyPy 3.11 7.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0c47bb37a5b80abcb7043d6b206068e4fbc90d27564aa667b2e7d90b2e7ff2cc
|
|
BLAKE2b-256 checksum How to use checksums |
17ad93ff0cb1be94d16357bdaf65fbe1f9c3dc33eb980a08af2c349bef71a43d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | arc4-0.5.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 PyPy 3.11 PyPy 3.11 7.3 |
|
SHA-256 checksum How to use checksums |
02435fe04cf147aff25a9be5380b16d6084f2469f51620b5fa3af936a6988c51
|
|
BLAKE2b-256 checksum How to use checksums |
a68012056b7138febb2e6c1294801ed7d072908ace2df58e0feed9347e3d9df4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl
| Download URL | arc4-0.5.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.9 kB |
| Tags | PyPy 3.11 PyPy 3.11 7.3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ccbed58bff2ce25b45535173221091b86162727caca66f4e383221f8b306113a
|
|
BLAKE2b-256 checksum How to use checksums |
1df6642e3b07a2db870354cfaad91535205455f09a03f4eeee82f72a37634662
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-pp310-pypy310_pp73-win_amd64.whl
| Download URL | arc4-0.5.0-pp310-pypy310_pp73-win_amd64.whl |
|---|---|
| Size | 10.1 kB |
| Tags | PyPy 3.10 PyPy 3.10 7.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e3f9144cad18c4cdf8d02de1068504c045b29461c511963e4a495ffb61af1148
|
|
BLAKE2b-256 checksum How to use checksums |
bf080bf1fe83abaf7c877490ef2b550f503cb865a80bab6c2f868e07843a17bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl
| Download URL | arc4-0.5.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.9 kB |
| Tags | PyPy 3.10 PyPy 3.10 7.3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cc0f6c9827d5f36a838cefbb3705ce1c6850df456d0e5b81c24733f857f3901d
|
|
BLAKE2b-256 checksum How to use checksums |
ece314bd4e0a24dc0f18f2236e40706899784d92059268c8039d32544ff9969a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp313-cp313-win_amd64.whl
| Download URL | arc4-0.5.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 10.1 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6fb7f6a7b16bc6fc3ed1eefaaa201810edec0e7dc08683970b2be0699b401e39
|
|
BLAKE2b-256 checksum How to use checksums |
dff7f7a9473114eead7cdb1419eaab156ad767218be748a47922117cfa1167c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | arc4-0.5.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 17.7 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
b8bcb09611b9e16a3f9d78b747c135386b59803a3fdecf4e7ff03eb3949e671b
|
|
BLAKE2b-256 checksum How to use checksums |
dd6e782c46bfc80ca5afd2fc29d5d611a1db9172759aa7d0e538517d6c8a96b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp313-cp313-macosx_10_13_universal2.whl
| Download URL | arc4-0.5.0-cp313-cp313-macosx_10_13_universal2.whl |
|---|---|
| Size | 10.1 kB |
| Tags | CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
ac5e9c3a589825afd31a10b6edd49bc8fe83ca88b4dc82dea6e977304304d36c
|
|
BLAKE2b-256 checksum How to use checksums |
dedcf434e3517d61f8a3d9c19bb2f615942ae0888d35dd1ab8a8f39dbf4014fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp312-cp312-win_amd64.whl
| Download URL | arc4-0.5.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 10.1 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4d07b1aa184b78a6e10d1920dbe92644b4113b34062ad2869f450e678bb7ada6
|
|
BLAKE2b-256 checksum How to use checksums |
7fafc2cd8636fa5f1e5bfee2d2772ac377ecea27112b7d4d5a664df9646542e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | arc4-0.5.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 17.6 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
7a3b4325e550a8bc2b56484edf91a983d2bd3f32fae8f169d5a5846a22554ea9
|
|
BLAKE2b-256 checksum How to use checksums |
7a77c4b547dd33a23079dff6e173fc2313841802bb9a1be3975673bf4c5efbe1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp312-cp312-macosx_10_13_universal2.whl
| Download URL | arc4-0.5.0-cp312-cp312-macosx_10_13_universal2.whl |
|---|---|
| Size | 10.1 kB |
| Tags | CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
7eb640302490f105c68336e763a9e8a9513377c46ad0a704c297d5d943f98831
|
|
BLAKE2b-256 checksum How to use checksums |
b2440c9ea0129c022a71ce3d686f4a04280a01657b83d8fff5de683524f10748
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp311-cp311-win_amd64.whl
| Download URL | arc4-0.5.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 10.0 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6c20103a2ff7cd43b91d707fb520a3d10dac5b9ef647957a2d19fa3a05725be6
|
|
BLAKE2b-256 checksum How to use checksums |
b9f7e4ff9ee3d4b6227fd2e3b34d66d2242b7f55fd245c537b578e7f2b60becb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | arc4-0.5.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 17.8 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
0ffd6df658cf4d348eebbd125e9dcd35fcfcb2efec31ff4258b85791b0207bad
|
|
BLAKE2b-256 checksum How to use checksums |
378084266d1b251fe29272d9f7796e3d4a323cf0a005749b6ddda45a191c2f11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp311-cp311-macosx_10_9_universal2.whl
| Download URL | arc4-0.5.0-cp311-cp311-macosx_10_9_universal2.whl |
|---|---|
| Size | 9.1 kB |
| Tags | CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
343a67c0bd2dcfdee78dc4269d8bd8ac362e6e911047833172468b337faccb1f
|
|
BLAKE2b-256 checksum How to use checksums |
e84ff2e28e91c9083876090e6218d3f601f7d54acdb5cc189fd4af406f104778
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp310-cp310-win_amd64.whl
| Download URL | arc4-0.5.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 10.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
631786051c1468d3ec1010d1fc1089b539831d72d7f08ea342bdcd25aa019620
|
|
BLAKE2b-256 checksum How to use checksums |
d9e92086b401b89885156424f3d5095de9ae3807ba04b05a768ba320c163ebc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | arc4-0.5.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 16.5 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
83a1f1934c55256838aa40998b87777f881e81c2056af9734cdb35a84574488c
|
|
BLAKE2b-256 checksum How to use checksums |
0b6832c530846e2037275c094854c63935a15fac694de9279e62b23d86cf00e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp310-cp310-macosx_10_9_universal2.whl
| Download URL | arc4-0.5.0-cp310-cp310-macosx_10_9_universal2.whl |
|---|---|
| Size | 9.1 kB |
| Tags | CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
2a052f9934746d81917032a4f37b390577141c56b4445c7f85c52b1155fdbf9f
|
|
BLAKE2b-256 checksum How to use checksums |
243fab228c5d60e1d6ba345fa993b5336cd24376a86851673e112ad09b681c91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp39-cp39-win_amd64.whl
| Download URL | arc4-0.5.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 10.3 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e6584f7a62bab998ef9a908307448cb62dee6555480da95a0c667e2d7372ab72
|
|
BLAKE2b-256 checksum How to use checksums |
dd1ed24142b5814a9f9ddb37630e7ca6316373ab5d2754ee62f36052afcc4e55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | arc4-0.5.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 16.3 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
2aa709409fed2e7db2525c5b2022369067feb25a44723a14c90b629c9d2fa091
|
|
BLAKE2b-256 checksum How to use checksums |
f92ff3548362dfb6fb09543c48b5f5ac2e4b79a0007942e9cf0f9b1711024eb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / arc4-0.5.0-cp39-cp39-macosx_10_9_universal2.whl
| Download URL | arc4-0.5.0-cp39-cp39-macosx_10_9_universal2.whl |
|---|---|
| Size | 9.1 kB |
| Tags | CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
8c8ce5f81553956660eb845c9d8ecea3db1de358e2b5fdfd49ba5033da2c4b14
|
|
BLAKE2b-256 checksum How to use checksums |
a27d73f01294b591634c1541477c44351f36399d580f681b5de6d2c9e4ecc00c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for arc4 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.