{"id":51509500,"url":"https://github.com/murphsicles/sha2","last_synced_at":"2026-07-08T04:30:56.985Z","repository":{"id":362042135,"uuid":"1257001719","full_name":"murphsicles/sha2","owner":"murphsicles","description":"SHA-256 cryptographic hash for Zeta","archived":false,"fork":false,"pushed_at":"2026-06-02T09:47:01.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T11:18:50.986Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/murphsicles.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-02T09:19:02.000Z","updated_at":"2026-06-02T09:47:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/murphsicles/sha2","commit_stats":null,"previous_names":["murphsicles/sha2"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/murphsicles/sha2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fsha2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fsha2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fsha2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fsha2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/murphsicles","download_url":"https://codeload.github.com/murphsicles/sha2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fsha2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35252324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-07-08T04:30:56.128Z","updated_at":"2026-07-08T04:30:56.971Z","avatar_url":"https://github.com/murphsicles.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚡ @crypto/sha2 — SHA-256 for Zeta\n\n**Port of the Rust `sha2` crate (v0.10.x). Pure Zeta implementation.\nAlso provides HMAC-SHA256 and HKDF.**\n\n---\n\n## 📦 Package\n\n```\nzorbs add @crypto/sha2\n```\n\n## 🔧 API\n\n### SHA-256 (One-shot)\n\n```zeta\nlet digest = Sha256::digest(\"hello world\");\n// digest is [u8; 32]\n```\n\n### SHA-256 (Incremental)\n\n```zeta\nlet mut hasher = Sha256::new();\nhasher.update(\"part 1 \");\nhasher.update(\"part 2 \");\nlet digest = hasher.finalize();\n```\n\n### HMAC-SHA256\n\n```zeta\nlet mac = hmac_sha256(key, \"message\");\n// 32-byte MAC tag\n```\n\n### HKDF (RFC 5869)\n\n```zeta\nlet derived = hkdf(salt, ikm, info, 32);\n// 32 bytes of derived key material\n\n// Or step-by-step:\nlet prk = hkdf_extract(salt, ikm);\nlet okm = hkdf_expand(\u0026prk, info, 32);\n```\n\n## 🔬 Verified Against\n\n| Test Vector | Status |\n|---|---|\n| SHA-256(\"abc\") | ✅ NIST CAVS |\n| SHA-256(\"\") | ✅ FIPS 180-4 |\n| SHA-256 incremental | ✅ Verified |\n| HMAC-SHA256 RFC 4231 Test 2 | ✅ |\n| HKDF RFC 5869 Test 1 | ✅ |\n\n## 📦 What's Inside\n\nThe package bundles the following Rust crate equivalents as internal modules:\n\n| Module | Source |\n|---|---|\n| `Sha256` | sha2 v0.10.x — SHA-256 |\n| `hmac_sha256()` | hmac v0.12.x — HMAC |\n| `hkdf()` | hkdf v0.12.x — HKDF |\n| `Digest` | digest v0.10.x — digest trait |\n| Buffer mgmt | block-buffer / crypto-common |\n\n## 📄 License\n\nMIT OR Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Fsha2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurphsicles%2Fsha2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Fsha2/lists"}