Skip to main content

A small and insanely fast ARCFOUR (RC4) cipher implementation of Python

Project description

Test Test Coverage Maintainability Documentation Status

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.

Benchmark

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.

https://arc4.readthedocs.io/en/latest/

Testing

python -m unittest discover

License

This software is under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arc4-0.4.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distributions

arc4-0.4.0-pp39-pypy39_pp73-win_amd64.whl (10.2 kB view details)

Uploaded PyPy Windows x86-64

arc4-0.4.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (8.4 kB view details)

Uploaded PyPy manylinux: glibc 2.28+ x86-64 manylinux: glibc 2.5+ x86-64

arc4-0.4.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (6.6 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

arc4-0.4.0-pp38-pypy38_pp73-win_amd64.whl (10.2 kB view details)

Uploaded PyPy Windows x86-64

arc4-0.4.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (8.4 kB view details)

Uploaded PyPy manylinux: glibc 2.28+ x86-64 manylinux: glibc 2.5+ x86-64

arc4-0.4.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (6.6 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

arc4-0.4.0-pp37-pypy37_pp73-win_amd64.whl (10.2 kB view details)

Uploaded PyPy Windows x86-64

arc4-0.4.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (8.4 kB view details)

Uploaded PyPy manylinux: glibc 2.28+ x86-64 manylinux: glibc 2.5+ x86-64

arc4-0.4.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (6.6 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

arc4-0.4.0-cp311-cp311-win_amd64.whl (9.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

arc4-0.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64 manylinux: glibc 2.5+ x86-64

arc4-0.4.0-cp311-cp311-macosx_10_9_universal2.whl (10.3 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

arc4-0.4.0-cp310-cp310-win_amd64.whl (9.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

arc4-0.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (16.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64 manylinux: glibc 2.5+ x86-64

arc4-0.4.0-cp310-cp310-macosx_11_0_x86_64.whl (6.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

arc4-0.4.0-cp39-cp39-win_amd64.whl (10.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

arc4-0.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (16.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64 manylinux: glibc 2.5+ x86-64

arc4-0.4.0-cp39-cp39-macosx_11_0_x86_64.whl (6.8 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

arc4-0.4.0-cp38-cp38-win_amd64.whl (10.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

arc4-0.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (16.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64 manylinux: glibc 2.5+ x86-64

arc4-0.4.0-cp38-cp38-macosx_10_15_x86_64.whl (6.8 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

arc4-0.4.0-cp37-cp37m-win_amd64.whl (10.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

arc4-0.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.6 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.28+ x86-64 manylinux: glibc 2.5+ x86-64

arc4-0.4.0-cp37-cp37m-macosx_10_15_x86_64.whl (6.8 kB view details)

Uploaded CPython 3.7m macOS 10.15+ x86-64

File details

Details for the file arc4-0.4.0.tar.gz.

File metadata

  • Download URL: arc4-0.4.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for arc4-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d431b53d11b24d62521dbbd06d755bf9d6d11a03cc7bbbdf37a13a12ee0747b6
MD5 04a9a47328bdea1c7b37b934d8adf10b
BLAKE2b-256 632dabd2c4d7ac0b515c63787a32e7ccb47c6a66fb4cd33ac5ad159fb2bf64b2

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 3da0dd7b6dd38c71af105aebef42bf587a624a0b26231717f1dcc53f36ab14d6
MD5 cc6d099e389592a8d1fa1ea0b193174e
BLAKE2b-256 1abfbef7533fe21f737139868baac23e39d24705de6a5913a454a40711b11e37

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8e5137eeb8f4c6f0c3bd23731c58359d554722b08119156058c99c337e78adb0
MD5 d4ebf20ed32b94acda943c94bbfa18fc
BLAKE2b-256 3aca90b044317c63798c8e82bce9ea62393f380a896bae8c937935c59524d06c

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 516e4fb4543e2a7c958b6fffb7658ba905b25b30af387b54c872418d87192fe6
MD5 aa54ab9c2f567c71e34aa32ff29b8e64
BLAKE2b-256 3fb35dd3e1b8fd6baaf48679d4b033eca6dcaddfc6ec27756d2817f23e2f6432

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp38-pypy38_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 15603d81bbb990038dfe7f7a424d16549161b2d5c1e216097cb065023895f398
MD5 f4351a70779ddf1f4b1c040244338e76
BLAKE2b-256 08287ce2e9f2115275c3f58cc879b04df236d58fb57e2f9020c54c647eff4985

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9954ee25a0687b1076791ae92cacb20c152fad2bf5bdac608f4c9472d76e83f0
MD5 77fc99c2fffad47a0f251e1f8d3f6195
BLAKE2b-256 af5d3061704fa32a394a01fd48f9977d5be6ba51226640806d8fb2056704d26d

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b1c72ceaff1b366d25ca5945ed381a520a8116195b7a4b0a69aaccac3f00d7ae
MD5 43256be440daf33a4370911778cd7271
BLAKE2b-256 b4dc9ab21876914aa1879cad7bcc6b511bf681b155f3d859eb458492a8d786a6

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp37-pypy37_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp37-pypy37_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 24d5aaf57494219651e15e260c4d3747c99764b94ea6fc46b09031c3ed2ef9d3
MD5 08f66871f3a1b52ab599b3affd1c0e88
BLAKE2b-256 124367a93b3a32159887ca1bf2b607f2fbe5c2da7513a34348f562ff26584a79

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e284d731da57f3c036c2497db47baf198057777f71670fe84d84347615df3e9f
MD5 474a7cc6c1fa505bada5e11d23e79d85
BLAKE2b-256 b96c9aa3ab230f93ed00ca1f6b10aafc7f192e0231c959091770a9bf4226572d

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 19d130ec333d9be891b156c02a4436b002ac486bc072644a453fabdfbe0354f8
MD5 126dab3942c4e440551d6ae87eb6a919
BLAKE2b-256 14b2e586e847a2fe285c38eb0cc561a0234b0f8f56e876de43dced64f17ff2e2

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: arc4-0.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for arc4-0.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9b9d14ed487f373c0d47b97262a3f26d6f03e725d640c4c230a51f5f3dd8a6b4
MD5 ff321d00a1492a00e86aaa46072b8838
BLAKE2b-256 6f1c600b0b7639824d0b4f9a587b19aba5d8856bb0b0bae222b471ddea9e8edf

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c0b9adcf7ab7ef7ca0ab60cf7e2dd8886fbc6610471ea9a8c7fb34416265451c
MD5 41a2eca2807f439f702edd52def39e83
BLAKE2b-256 7f2f5fa47c3b00527ea6d94069a2bd7e02567a2d4e5e7d5d5fd80b790c13a1e8

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3cdae371789b621927866a1b10862ea20dbe519b1b86cb725ff2dd95525c704f
MD5 486bc221380ed7175eba9252c6f1b104
BLAKE2b-256 d576e1ab69419aca97e37329c2cba58951eacd9baba1933b6c628347a2d46257

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: arc4-0.4.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.2 CPython/3.11.3

File hashes

Hashes for arc4-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cd9c4fc470019e184f72aacc5fdcb2a3364e7c174aaa6de2486ca18e9d377a5d
MD5 203f7cb32f681db2696c2c670f5f0351
BLAKE2b-256 1895a31bfc7df587112fc718b906ed3b3237b43d9c77ab59c8b388aa3ea00a25

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f20540dd6ab695e6d1205a5edb4df416688ef39242cbbec4ad0b534e38ffe55f
MD5 264840b53a45abefe0138fb0ece89418
BLAKE2b-256 bb7c6528838027abe57aaa47a32b48e9cf8e7318f42f3cdbe86568088f219d2a

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d27d6cb7fef8787c3cb91c06a6adb2315551f42af3b4142d45703d5303e6ad2b
MD5 ecc0c96180b9a54864109f7bcd908ccc
BLAKE2b-256 a1344341c7076e62727f8182ced8b45cfa99a2b88530c93e9d6f93aec231d2be

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: arc4-0.4.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.2 CPython/3.11.3

File hashes

Hashes for arc4-0.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f419c08cfb2cc8f374725a76dd8fd40d87b6a0e236774cb3307f2f51f6794c1f
MD5 c8a5e76b90654d7de59dc055a6e7c9f0
BLAKE2b-256 0bba370b6152863da24a8c01007cbb47d8930604edf116a7c59a055d53951e46

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b935c41b8691001b6a6746c2611a0a76962720a83688501dac8f3c74f9db4f34
MD5 2fa2efaf14b811c8e520a9d9028584ed
BLAKE2b-256 5f6b3a18540fc446e7302aacba317174fc331939e313c8493cf60d3166236613

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 779d1b53c75e66edd023b9240dbd00df7b241ab50b6a4ea86ab97117dbbff86f
MD5 564038bbee1d9c264be1699eafd96e2d
BLAKE2b-256 b59e9a3fe209fae8259752e8ad7a1b58348fadf23f0db7b675a98aa09cd55271

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: arc4-0.4.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.2 CPython/3.11.3

File hashes

Hashes for arc4-0.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 eb5eb33e3c68d68c548355aead25843502d3d1b909fa2e3b3f2520d467708af5
MD5 2ed55deb356277d64a8ff210a1351703
BLAKE2b-256 27472a1346f416658524b04bf06386be765311935f94c73ce4e609f49df07af3

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 62ed00203dee645d99422a1dc1efdd5ca108048e8c047a239c3be0a690f6abb6
MD5 4df1e89f11a8b077bca5ef9cabc8a42b
BLAKE2b-256 9f636b6e6c9615ce0d6fb05966d1206dc504fe40d4ca542467c63c04b9a11eef

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2104d551744e9b851a12c144b512244da224ab4f5f68ed28a45a599937ead1cd
MD5 7c754052c8f5e8aecd7407e71ef073e2
BLAKE2b-256 f6f2626aa3388bf555b40af8682195489d934aa5c0d8a02103b1a81aecd4463f

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: arc4-0.4.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for arc4-0.4.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 be661d59b250e83753fd0aa7dfb0796f1475c19be929d581805e1a1c998fb959
MD5 3a001281949f567f328d8d936b47514f
BLAKE2b-256 a0353e08553a571dd942e8c31038545f224645a35bc39d193cbbbe4fc73fe836

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5e2e52410c5dde5cd7a89eb32440ad94de99b6bb2d6c886a099455b71f68dee3
MD5 ee2a49af0b7c3e062ff4232f9e8a93fa
BLAKE2b-256 cd1ba0b25284cff5b1309c387ef74eedca1bf25c59cf2aa91b588cbb37c52a97

See more details on using hashes here.

File details

Details for the file arc4-0.4.0-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for arc4-0.4.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 45aba6a58fd8d83ec8fa14d8e99f686f9317667c19adca56c5eaa59aae630b3d
MD5 a28d98fb40803f80b979e587bd954444
BLAKE2b-256 6cadb7b562a746706e96bf616b769caab904a2256a535ace50518da1d667b8c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page