{"id":18715877,"url":"https://github.com/davidbuchanan314/rc4","last_synced_at":"2026-03-15T18:41:49.275Z","repository":{"id":104802053,"uuid":"149929775","full_name":"DavidBuchanan314/rc4","owner":"DavidBuchanan314","description":"A python3 RC4 implementation that doesn't suck. (i.e. it's actually binary-safe...)","archived":false,"fork":false,"pushed_at":"2024-09-03T14:50:26.000Z","size":17,"stargazers_count":18,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T13:13:34.116Z","etag":null,"topics":["cryptography","python","python3","rc4","rc4-algorithm"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidBuchanan314.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-22T23:15:13.000Z","updated_at":"2025-03-05T01:27:28.000Z","dependencies_parsed_at":"2023-05-30T00:30:22.821Z","dependency_job_id":null,"html_url":"https://github.com/DavidBuchanan314/rc4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Frc4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Frc4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Frc4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Frc4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidBuchanan314","download_url":"https://codeload.github.com/DavidBuchanan314/rc4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571862,"owners_count":21126522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","python","python3","rc4","rc4-algorithm"],"created_at":"2024-11-07T13:10:50.620Z","updated_at":"2026-03-15T18:41:44.236Z","avatar_url":"https://github.com/DavidBuchanan314.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rc4\nA python3 RC4 implementation that doesn't suck. (i.e. it's actually binary-safe...)\n\n\u003e [!WARNING]\n\u003e RC4 is cryptographically broken. Treat it as if it were rot13, base64, or other trivial encoding. Only use this if you know precisely why you're using it.\n\nLiterally every other implementation I could find relied on chr/ord to decode bytes,\nwhich would fail on any invalid unicode sequences.\n\nUpdate: [PyCrypto's implementation](https://pycryptodome.readthedocs.io/en/latest/src/cipher/arc4.html) Isn't that bad, and you should probably use that instead, if you can. However, it places arbitrary restrictions on key size, which is a dealbreaker for some applications (i.e. legacy hardware/software backwards-compatibility).\n\nThis implementation uses bytes/bytearray objects to work with binary data, and\nhas been tested against [RFC6229](https://tools.ietf.org/rfc/rfc6229.txt).\n\nSupports python 3.4+.\n\n## Example usage:\n\n```python\nfrom rc4 import RC4\n\ncipher = RC4(b\"secret\", streaming=False)\nmsg = b\"Not very secret message\"\n\nciphertext = cipher.crypt(msg)\nprint(ciphertext) #=\u003e b'\\xa3Y\\xa6\u003c\\xf4\\xc1\\xa4\\xdf\\x12\\xb8\\xde\\xbf\\x81\\x83\\x81\\x17\\xc0R\\x01\\x91\\xe2\\x94\\xa1'\n\nplaintext = cipher.crypt(ciphertext)\nprint(plaintext) #=\u003e b'Not very secret message'\n\nassert(plaintext == msg)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbuchanan314%2Frc4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbuchanan314%2Frc4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbuchanan314%2Frc4/lists"}