{"id":22700421,"url":"https://github.com/uncomputable/convex","last_synced_at":"2025-03-29T19:11:34.058Z","repository":{"id":222128928,"uuid":"716628497","full_name":"uncomputable/convex","owner":"uncomputable","description":"Convert between different hex representations","archived":false,"fork":false,"pushed_at":"2024-08-22T21:14:16.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T19:46:39.570Z","etag":null,"topics":["application","cli","fuzzing","hex","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uncomputable.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":"2023-11-09T14:35:25.000Z","updated_at":"2024-08-22T21:14:20.000Z","dependencies_parsed_at":"2024-02-12T15:15:54.185Z","dependency_job_id":"78a900c6-bde8-4f98-9f23-21f47076aab4","html_url":"https://github.com/uncomputable/convex","commit_stats":null,"previous_names":["uncomputable/convex"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uncomputable%2Fconvex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uncomputable%2Fconvex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uncomputable%2Fconvex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uncomputable%2Fconvex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uncomputable","download_url":"https://codeload.github.com/uncomputable/convex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246230541,"owners_count":20744349,"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":["application","cli","fuzzing","hex","python"],"created_at":"2024-12-10T06:12:08.074Z","updated_at":"2025-03-29T19:11:34.039Z","avatar_url":"https://github.com/uncomputable.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Convex: Hex Converter\n\nConvert between different hex representations.\n\n```bash\n$ convex [--from-{c,coq,rust,json,...}] [--to-{c,coq,rust,json,...}] [--reverse] input\n```\n\nIgnores whitespaces and newlines.\n\n```bash\n$ convex --to-c \"\n       209577bda6bf4b5804bd46f8621580dd6d4e8bfa2d190e1c50e932492baca07d\"\n0x209577bdu, 0xa6bf4b58u, 0x04bd46f8u, 0x621580ddu, 0x6d4e8bfau, 0x2d190e1cu, 0x50e93249u, 0x2baca07du\n```\n\nAutomatically matches the input format using regex.\n\n```bash\n$ convex \"0x209577bdu, 0xa6bf4b58u, 0x04bd46f8u, 0x621580ddu, 0x6d4e8bfau, 0x2d190e1cu, 0x50e93249u, 0x2baca07du\"\n209577bda6bf4b5804bd46f8621580dd6d4e8bfa2d190e1c50e932492baca07d\n```\n\n```bash\n$ convex \"32%Z; 149%Z; 119%Z; 189%Z; 166%Z; 191%Z; 75%Z; 88%Z; 4%Z; 189%Z; 70%Z; 248%Z; 98%Z; 21%Z; 128%Z; 221%Z; 109%Z; 78%Z; 139%Z; 250%Z; 45%Z; 25%Z; 14%Z; 28%Z; 80%Z; 233%Z; 50%Z; 73%Z; 43%Z; 172%Z; 160%Z; 125%Z\"\n209577bda6bf4b5804bd46f8621580dd6d4e8bfa2d190e1c50e932492baca07d\n```\n\nReverses the input if needed.\n\n```bash\n$ convex --reverse \"209577bda6bf4b5804bd46f8621580dd6d4e8bfa2d190e1c50e932492baca07d\"\n7da0ac2b4932e9501c0e192dfa8b4e6ddd801562f846bd04584bbfa6bd779520\n```\n\nFuzzed for correctness.\n\n## Supported representations\n\n### String\n\n```bash\n$ convex --to-c \"209577bda6bf4b5804bd46f8621580dd6d4e8bfa2d190e1c50e932492baca07d\"\n0x209577bdu, 0xa6bf4b58u, 0x04bd46f8u, 0x621580ddu, 0x6d4e8bfau, 0x2d190e1cu, 0x50e93249u, 0x2baca07du\n````\n\n### C\n\n```bash\n$ convex --to-coq \"0x209577bdu, 0xa6bf4b58u, 0x04bd46f8u, 0x621580ddu, 0x6d4e8bfau, 0x2d190e1cu, 0x50e93249u, 0x2baca07du\"\n32%Z; 149%Z; 119%Z; 189%Z; 166%Z; 191%Z; 75%Z; 88%Z; 4%Z; 189%Z; 70%Z; 248%Z; 98%Z; 21%Z; 128%Z; 221%Z; 109%Z; 78%Z; 139%Z; 250%Z; 45%Z; 25%Z; 14%Z; 28%Z; 80%Z; 233%Z; 50%Z; 73%Z; 43%Z; 172%Z; 160%Z; 125%Z```\n```\n\n### Coq\n\n```bash\n$ convex --to-rust \"32%Z; 149%Z; 119%Z; 189%Z; 166%Z; 191%Z; 75%Z; 88%Z; 4%Z; 189%Z; 70%Z; 248%Z; 98%Z; 21%Z; 128%Z; 221%Z; 109%Z; 78%Z; 139%Z; 250%Z; 45%Z; 25%Z; 14%Z; 28%Z; 80%Z; 233%Z; 50%Z; 73%Z; 43%Z; 172%Z; 160%Z; 125%Z\"\n0x20, 0x95, 0x77, 0xbd, 0xa6, 0xbf, 0x4b, 0x58, 0x04, 0xbd, 0x46, 0xf8, 0x62, 0x15, 0x80, 0xdd, 0x6d, 0x4e, 0x8b, 0xfa, 0x2d, 0x19, 0x0e, 0x1c, 0x50, 0xe9, 0x32, 0x49, 0x2b, 0xac, 0xa0, 0x7d\n```\n\n### Rust\n\n```bash\n$ convex --to-json \"0x20, 0x95, 0x77, 0xbd, 0xa6, 0xbf, 0x4b, 0x58, 0x04, 0xbd, 0x46, 0xf8, 0x62, 0x15, 0x80, 0xdd, 0x6d, 0x4e, 0x8b, 0xfa, 0x2d, 0x19, 0x0e, 0x1c, 0x50, 0xe9, 0x32, 0x49, 0x2b, 0xac, 0xa0, 0x7d\"\n32, 149, 119, 189, 166, 191, 75, 88, 4, 189, 70, 248, 98, 21, 128, 221, 109, 78, 139, 250, 45, 25, 14, 28, 80, 233, 50, 73, 43, 172, 160, 125\n```\n\n### JSON\n\n```\n$ convex \"32, 149, 119, 189, 166, 191, 75, 88, 4, 189, 70, 248, 98, 21, 128, 221, 109, 78, 139, 250, 45, 25, 14, 28, 80, 233, 50, 73, 43, 172, 160, 125\"\n209577bda6bf4b5804bd46f8621580dd6d4e8bfa2d190e1c50e932492baca07d\n```\n\n## Run the script\n\nThere are zero dependencies so just run python.\n\n```bash\npython convex.py\n```\n\n## Install the script using nix\n\nBuild the default package.\n\n```bash\nnix-build\n```\n\nInstall the built derivation in your nix profile.\n\n```bash\nnix profile install ./result\n```\n\n## Install the script using pip\n\nInstall the script using pip.\n\n```bash\npip install .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funcomputable%2Fconvex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funcomputable%2Fconvex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funcomputable%2Fconvex/lists"}