{"id":18119642,"url":"https://github.com/mostlygeek/parhash","last_synced_at":"2025-04-06T11:18:15.302Z","repository":{"id":66828451,"uuid":"113722734","full_name":"mostlygeek/parhash","owner":"mostlygeek","description":"golang library to compute hash digests in parallel","archived":false,"fork":false,"pushed_at":"2017-12-12T07:52:06.000Z","size":14,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T16:51:47.416Z","etag":null,"topics":["golang","hashing-algorithm","md5","parallel","sha1"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mostlygeek.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":"2017-12-10T04:25:43.000Z","updated_at":"2023-11-14T07:33:27.000Z","dependencies_parsed_at":"2023-06-19T20:18:18.488Z","dependency_job_id":null,"html_url":"https://github.com/mostlygeek/parhash","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"781b8e0ea2c04dac366a5fedab0b74130b07b941"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mostlygeek%2Fparhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mostlygeek%2Fparhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mostlygeek%2Fparhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mostlygeek%2Fparhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mostlygeek","download_url":"https://codeload.github.com/mostlygeek/parhash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471521,"owners_count":20944158,"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":["golang","hashing-algorithm","md5","parallel","sha1"],"created_at":"2024-11-01T05:16:27.232Z","updated_at":"2025-04-06T11:18:15.274Z","avatar_url":"https://github.com/mostlygeek.png","language":"Go","readme":"[![](https://godoc.org/github.com/mostlygeek/parhash?status.svg)](https://godoc.org/github.com/mostlygeek/parhash)\n\n# About\n\nParhash presents tools for making it easy to generate multiple\nhash sums over the same data. It does this in parallel, spreading the\ncomputation work over all available CPUs.\n\nParhash has a speed advantage over serial operations when working\nwith multiple hash algorithms over large data. Run the benchmark to see\nthe difference over serial operation on your machine:\n\n```\n    go test -bench .\n```\n\nOn my machine, i7 3.5Ghz dual core I get a speed up of about 240%\n\n```\n  BenchmarkSerial-4            500           3577258 ns/op\n  BenchmarkParallel-4         1000           1458583 ns/op\n```\n\nFor smaller data sets parhash won't see significant performance\nadvantages due to the overhead of using channels and goroutines\ndistribute the work.\n\n## Installation\n\n```\ngo get github.com/mostlygeek/parhash\n\n```\n\n## Usage Example\n\n\n```\np := parhash.New()\n\n// Add returns the same hash to make creation and assignment more concise\nhash1 := p.Add(md5.New())\nhash2 := p.Add(sha1.New())\n\n// Parhash is an io.Writer\nfmt.Fprintf(p, \"Hello World\")\nfmt.Printf(\"MD5 : %s\\n\", hex.EncodeToString(hash1.Sum(nil)))\nfmt.Printf(\"SHA1: %s\", hex.EncodeToString(hash2.Sum(nil)))\n\n// Output:\n// MD5 : b10a8db164e0754105b7a99be72e3fe5\n// SHA1: 0a4d55a8d778e5022fab701977c5d840bbc486d0\n```\n\n## CLI\n\nA command line tool is included as an example. It includes many of the hash\nalgorithms available from go's standard library. Try it out, it's fun!\n\nTo install it do this:\n\n```\ncd cmd\ngo build -o $GOPATH/bin/parhasher parhasher.go\n```\n\nUsage:\n\n* `parhasher -h` - prints out help\n* `parhasher -a \u003cfile\u003e` - computes sums using all available hash algorithms for \u003cfile\u003e\n* `parhasher -sha1 -md5 \u003cfile\u003e` - computes a sha1 and md5 sum for \u003cfile\u003e\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2017 Benson Wong\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostlygeek%2Fparhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmostlygeek%2Fparhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostlygeek%2Fparhash/lists"}