{"id":18803495,"url":"https://github.com/rofrol/sha256sum-zig","last_synced_at":"2026-01-05T16:30:14.500Z","repository":{"id":66526231,"uuid":"599033578","full_name":"rofrol/sha256sum-zig","owner":"rofrol","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-20T15:06:58.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-19T07:37:06.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","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/rofrol.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-02-08T10:08:33.000Z","updated_at":"2024-05-05T22:06:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"f35a45f7-8f46-47a5-92c6-8004215cc98f","html_url":"https://github.com/rofrol/sha256sum-zig","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/rofrol%2Fsha256sum-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rofrol%2Fsha256sum-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rofrol%2Fsha256sum-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rofrol%2Fsha256sum-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rofrol","download_url":"https://codeload.github.com/rofrol/sha256sum-zig/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239735263,"owners_count":19688262,"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":[],"created_at":"2024-11-07T22:35:31.466Z","updated_at":"2026-01-05T16:30:14.452Z","avatar_url":"https://github.com/rofrol.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Usage\n\n```shell\n% zig build run -- ~/Downloads/gu9m3isal4ga1.jpg\n9747fe70814f566b6ccfaf624fac8cb59d66203fbbb48fd8110eac49efdeb98e\n```\n\nOr\n\n```shell\n% zig build\n% ./zig-out/bin/sha256sum ~/Downloads/gu9m3isal4ga1.jpg\n9747fe70814f566b6ccfaf624fac8cb59d66203fbbb48fd8110eac49efdeb98e\n```\n\n## Use hashFile from zig-extras\n\nI have changed to using hashFile from zig-extras after this comment by meghan (nektro):\n\n\u003eusing https://github.com/nektro/zig-extras/blob/master/src/lib.zig#L168 you can avoid the heap allocation and hash arbitrarily large inputs\n\u003e\n\u003eby passing in file.reader() and hash.writer()\n\u003e\n\u003ealso the hasher is meant to be made an instance of as seen in https://github.com/nektro/zig-extras/blob/master/src/lib.zig#L155\n\nhttps://discord.com/channels/605571803288698900/1075367108516515881/1075367621689610270\n\n## Links\n\n- sha256 example https://github.com/ziglang/zig/issues/13400\n- from hex https://github.com/hexops/mach/blob/35ae2d7ac795395291d0cd95646ac138a48c8762/tools/wasmserve/wasmserve.zig#L1171\n- https://github.com/tigerbeetledb/tigerbeetle/blob/0e32c5b5c5a38fb42946d2bc5451a3e87f759be7/src/vopr.zig#L377\n- https://github.com/kubkon/zld/blob/4800da973230dae0897892a4d89666b39d096791/src/MachO/CodeSignature.zig#L304\n- https://github.com/mathetake/proxy-wasm-zig-sdk/blob/75e2a742912f85bcdd2b7baf33610a45cb1c9105/example/example.zig#L740\n- https://ziglearn.org/chapter-2/#crypto\n- [A tour of std.crypto in Zig 0.7.0 - Frank Denis - YouTube](https://www.youtube.com/watch?v=9t6Y7KoCvyk)\n- https://stackoverflow.com/questions/70189554/how-can-you-create-a-buffer-of-the-same-size-as-a-file/72334950#72334950\n- https://stackoverflow.com/questions/68368122/how-to-read-a-file-in-zig/68879352#68879352\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frofrol%2Fsha256sum-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frofrol%2Fsha256sum-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frofrol%2Fsha256sum-zig/lists"}