{"id":25123647,"url":"https://github.com/52/c32","last_synced_at":"2026-02-26T10:11:29.278Z","repository":{"id":275140124,"uuid":"922204403","full_name":"52/c32","owner":"52","description":"Rust implementation of Crockford's Base32 encoding","archived":false,"fork":false,"pushed_at":"2025-04-30T15:08:23.000Z","size":6875,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-04T06:25:16.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crates.io/crates/c32","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/52.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-25T15:44:48.000Z","updated_at":"2025-08-31T20:26:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"51a3a6bb-39cf-47f0-b264-805a72e6f0bc","html_url":"https://github.com/52/c32","commit_stats":null,"previous_names":["52/c32"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/52/c32","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52%2Fc32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52%2Fc32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52%2Fc32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52%2Fc32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/52","download_url":"https://codeload.github.com/52/c32/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52%2Fc32/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29856088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["base32","crockford","stacks-blockchain"],"created_at":"2025-02-08T07:17:12.805Z","updated_at":"2026-02-26T10:11:29.271Z","avatar_url":"https://github.com/52.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"`c32`\n===============\n\n[![Crates.io](https://img.shields.io/crates/v/c32.svg)][Crates.io]\n[![Documentation](https://docs.rs/c32/badge.svg)][Docs.rs]\n[![Build Status](https://img.shields.io/github/actions/workflow/status/52/c32/rust.yml?branch=master)][Workflow]\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)][License-Apache]\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)][License-MIT]\n\nRust implementation of [Crockford's Base32][Crockford] encoding scheme.\n\n```toml\n[dependencies]\nc32 = \"0.6.0\"\n```\n\n## Implementation\n\n* **Lightweight** — The core functionality has zero external dependencies.\n* **Portable** — Fully compatible with `#![no_std]` environments.\n* **Safe** — Implemented entirely in safe Rust with no `unsafe` blocks.\n\n## Examples\n\n```rust\nlet bytes = b\"usque ad finem\";\nlet encoded = c32::encode(\u0026bytes);\nassert_eq!(encoded, \"1TQ6WBNCMG62S10CSMPWSBD\");\n```\n\n```rust\nlet bytes = b\"usque ad finem\";\nlet decoded = c32::decode(\"1TQ6WBNCMG62S10CSMPWSBD\")?;\nassert_eq!(decoded, bytes);\n```\n\n### In `#![no_std]` Environments\n\nFor environments without allocation support, the library provides buffer-based APIs:\n\n```rust\n// encoding with a pre-allocated buffer\nlet bytes = b\"usque ad finem\";\nlet mut buffer = [0; 32];\n\nlet written = c32::encode_into(bytes, \u0026mut buffer)?;\nlet encoded = \u0026buffer[..written];\nassert_eq!(encoded, b\"1TQ6WBNCMG62S10CSMPWSBD\");\n```\n\n```rust\n// decoding with a pre-allocated buffer\nlet encoded = b\"1TQ6WBNCMG62S10CSMPWSBD\";\nlet mut buffer = [0; 32];\n\nlet written = c32::decode_into(encoded, \u0026mut buffer)?;\nlet decoded = \u0026buffer[..written];\nassert_eq!(decoded, b\"usque ad finem\");\n```\n\n### Checksum\n\nThe `check` feature provides methods for encoding data with SHA256-based checksum verification.\n\nThe encoded data follows this layout:\n\n```text\n[version (1B)] + [payload (nB)] + [checksum (4B)]\n```\n\nAnd is computed by...\n\n```text\n1. Concatenating the version byte with the payload bytes.\n2. Taking the SHA256 hash of the concatenated bytes.\n3. Taking the SHA256 hash of the result.\n4. Using the first 4 bytes as the checksum.\n```\n\n```rust\nlet bytes = b\"usque ad finem\";\nlet encoded = c32::encode_check(bytes, 22)?;\nassert_eq!(encoded, \"P7AWVHENJJ0RB441K6JVK5DNJ7J3V5\");\n```\n\n```rust\nlet encoded = \"P7AWVHENJJ0RB441K6JVK5DNJ7J3V5\";\nlet (decoded, version) = c32::decode_check(encoded)?;\nassert_eq!(decoded, b\"usque ad finem\");\nassert_eq!(version, 22);\n```\n\nFor more details, please refer to the full [API Reference][Docs.rs].\n\n## Security\n\n\u003csup\u003e\nFor security-related concerns, please review the \u003ca href=\"SECURITY.md\"\u003eSecurity Policy\u003c/a\u003e.\n\u003c/sup\u003e\n\n## License\n\n\u003csup\u003e\nLicensed under \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version 2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT License\u003c/a\u003e at your discretion.\n\u003c/sup\u003e\n\n## Contribution\n\n\u003csup\u003e\nContributions to this crate will be dual-licensed under \u003ca href=\"LICENSE-APACHE\"\u003eApache-2.0\u003c/a\u003e and \u003ca href=\"LICENSE-MIT\"\u003eMIT\u003c/a\u003e by default, unless specifically indicated otherwise.\n\u003c/sup\u003e\n\n[Crates.io]: https://crates.io/crates/c32\n[Docs.rs]: https://docs.rs/c32\n[Workflow]: https://github.com/52/c32/actions\n[License-Apache]: https://opensource.org/licenses/Apache-2.0\n[License-MIT]: https://opensource.org/licenses/MIT\n[Crockford]: https://www.crockford.com/base32.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F52%2Fc32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F52%2Fc32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F52%2Fc32/lists"}