{"id":15752504,"url":"https://github.com/remram44/python-rfc1751","last_synced_at":"2025-03-31T07:26:58.152Z","repository":{"id":235605208,"uuid":"790915200","full_name":"remram44/python-rfc1751","owner":"remram44","description":"Pure Python implementation of the binary-to-text encoding from RFC 1751, S/Key","archived":false,"fork":false,"pushed_at":"2024-04-24T15:34:13.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-03-28T21:11:18.730Z","etag":null,"topics":["binary","encoding","human-readable","rfc1751"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remram44.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-04-23T18:58:23.000Z","updated_at":"2024-04-24T15:34:16.000Z","dependencies_parsed_at":"2024-10-04T07:02:38.623Z","dependency_job_id":"c69bc627-efff-49af-a910-8e2314b9a78d","html_url":"https://github.com/remram44/python-rfc1751","commit_stats":null,"previous_names":["remram44/python-rfc1751"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fpython-rfc1751","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fpython-rfc1751/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fpython-rfc1751/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fpython-rfc1751/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remram44","download_url":"https://codeload.github.com/remram44/python-rfc1751/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246431628,"owners_count":20776254,"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":["binary","encoding","human-readable","rfc1751"],"created_at":"2024-10-04T07:02:35.568Z","updated_at":"2025-03-31T07:26:58.107Z","avatar_url":"https://github.com/remram44.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a Pure-Python implementation of [RFC 1751](https://www.rfc-editor.org/rfc/rfc1751).\n\nUsing this small library, you can turn binary strings (for example IDs or passwords) into small sequences of short English words. For example:\n\n```\nEB33 F77E E73D 4053\n```\n\nwould become:\n\n```\nTIDE ITCH SLOW REIN RULE MOT\n```\n\nThe algorithm turns a 64-bit string into 6 English words and vice versa. Two bits of parity are included in the sequence of words, which allow detecting an invalid or corrupted phrase.\n\n# Usage\n\n```pycon\n\u003e\u003e\u003e # Simple conversion from string or bytes\n\u003e\u003e\u003e rfc1751.bytes_to_string([204, 172, 42, 237, 89, 16, 86, 190])\n'RASH BUSH MILK LOOK BAD BRIM'\n\u003e\u003e\u003e rfc1751.bytes_to_string(b'\\xCC\\xAC\\x2A\\xED\\x59\\x10\\x56\\xBE')\n'RASH BUSH MILK LOOK BAD BRIM'\n\n\u003e\u003e\u003e # You can specify the separator or get a sequence\n\u003e\u003e\u003e rfc1751.bytes_to_string(b'\\xCC\\xAC\\x2A\\xED\\x59\\x10\\x56\\xBE', sep='-').lower()\n'rash-bush-milk-look-bad-brim'\n\u003e\u003e\u003e rfc1751.bytes_to_words(b'\\xCC\\xAC\\x2A\\xED\\x59\\x10\\x56\\xBE')\n['RASH', 'BUSH', 'MILK', 'LOOK', 'BAD', 'BRIM']\n\n\u003e\u003e\u003e # Conversion back\n\u003e\u003e\u003e rfc1751.string_to_bytes('RASH BUSH MILK LOOK BAD BRIM')\nb'\\xCC\\xAC\\x2A\\xED\\x59\\x10\\x56\\xBE'\n\u003e\u003e\u003e list(rfc1751.string_to_bytes('RASH BUSH MILK LOOK BAD BRIM'))\n[204, 172, 42, 237, 89, 16, 86, 190]\n\n\u003e\u003e\u003e # You can specify the separator or give a sequence\n\u003e\u003e\u003e rfc1751.string_to_bytes('rash-bush-milk-look-bad-brim', sep='-')\nb'\\xCC\\xAC\\x2A\\xED\\x59\\x10\\x56\\xBE'\n\u003e\u003e\u003e rfc1751.words_to_bytes(['rash', 'bush', 'milk', 'look', 'bad', 'brim'])\nb'\\xCC\\xAC\\x2A\\xED\\x59\\x10\\x56\\xBE'\n\n\u003e\u003e\u003e # You can also use a custom alphabet as long as it is 2048 words\n\u003e\u003e\u003e custom_rfc1751 = rfc1751.Rfc1751(custom_2048_words)\n\u003e\u003e\u003e custom_rfc1751.bytes_to_string([204, 172, 42, 237, 89, 16, 86, 190])\n'SMILE GENUINE ROBUST RATE AIR GAME'\n\u003e\u003e\u003e list(custom_rfc1751.string_to_bytes('SMILE GENUINE ROBUST RATE AIR GAME'))\n[204, 172, 42, 237, 89, 16, 86, 190]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremram44%2Fpython-rfc1751","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremram44%2Fpython-rfc1751","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremram44%2Fpython-rfc1751/lists"}