{"id":24107910,"url":"https://github.com/ricardobranco777/xhash","last_synced_at":"2025-05-12T18:26:48.959Z","repository":{"id":63486846,"uuid":"77556765","full_name":"ricardobranco777/xhash","owner":"ricardobranco777","description":"This Go program uses goroutines to calculate multiple hashes on strings, files and directories","archived":false,"fork":false,"pushed_at":"2025-04-14T20:19:09.000Z","size":271,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T21:26:47.764Z","etag":null,"topics":["blake2b","golang","goroutine","hashing","md5","sha1","sha256","sha3"],"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/ricardobranco777.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":"2016-12-28T19:38:49.000Z","updated_at":"2025-04-14T20:19:13.000Z","dependencies_parsed_at":"2024-05-11T17:23:08.305Z","dependency_job_id":"9687869a-4bb2-42bf-93dc-b0fa1fdc5aa7","html_url":"https://github.com/ricardobranco777/xhash","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardobranco777%2Fxhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardobranco777%2Fxhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardobranco777%2Fxhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardobranco777%2Fxhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricardobranco777","download_url":"https://codeload.github.com/ricardobranco777/xhash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253796963,"owners_count":21965812,"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":["blake2b","golang","goroutine","hashing","md5","sha1","sha256","sha3"],"created_at":"2025-01-10T22:53:16.390Z","updated_at":"2025-05-12T18:26:48.944Z","avatar_url":"https://github.com/ricardobranco777.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/ricardobranco777/xhash/actions/workflows/ci.yml/badge.svg)\n\n# xhash\nThis Go program uses goroutines to calculate multiple hashes on strings, files and directories.  By default it reads from standard input.  It can be used as a drop-in replacement for the GNU **coreutils** when hard-linked as **md5sum**, etc. and it actually supports the `--zero` option with `--check`, [unlike the GNU tool](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69368).  The output format is fully configurable.\n\nDocker image available at `ghcr.io/ricardobranco777/xhash:latest`\n\n## Examples:\n\n* To hash every file in your home directory using both SHA-512 and SHA-256\n\n`xhash -r -sha512 -sha256 $HOME`\n\n* To hash the /etc/passwd file with all algorithms _except_ MD5 and SHA-1\n\n`xhash -all -md5 -sha1 /etc/passwd`\n\n* To hash the string \"abc\" with all algorithms\n\n`xhash -all -s \"abc\"`\n\n* To check the hashes in /tmp/hashes.md5\n\n`xhash -c /tmp/hashes.md5`\n\n* To hash all files specified in /tmp/files.list\n\n`xhash -i /tmp/files.list`\n\n## Output format\n\nThe output format is the same as the BSD commands.  Use `--gnu` to use the format used by **md5sum**.\n\nTo use the format used by **hashdeep** use `--size -f '{{range .}}{{.Sum}},{{end}}{{(index . 0).File}}\\n'`\n\n## Requirements\n\n- Go 1.24+\n\n## Usage\n\n```\nUsage: xhash [OPTIONS] [-s STRING...]|[-c FILE]|[-i FILE]|[FILE...]|[-r FILE... DIRECTORY...]\n  -a, --all              all algorithms (except others specified, if any)\n  -b, --base64           output hash in Base64 encoding format\n      --blake2b-256      BLAKE2b-256 algorithm\n      --blake2b-512      BLAKE2b-512 algorithm\n      --blake2s-256      BLAKE2s-256 algorithm\n      --blake3           BLAKE3 algorithm\n  -c, --check string     read checksums from file (use \"\" for stdin) (default \"\\x00\")\n  -f, --format string    output format (default \"{{range .}}{{.Name}} ({{.File}}) = {{.Sum }}\\n{{end}}\")\n      --gnu              output hashes in the format used by md5sum\n  -H, --hmac string      key for HMAC (in hexadecimal) or read from specified pathname (default \"\\x00\")\n      --ignore-missing   don't fail or report status for missing files\n  -i, --input string     read pathnames from file (use \"\" for stdin) (default \"\\x00\")\n      --md5              MD5 algorithm\n  -q, --quiet            don't print OK for each successfully verified file\n  -r, --recursive        recurse into directories\n      --sha1             SHA1 algorithm\n      --sha256           SHA256 algorithm\n      --sha3-256         SHA3-256 algorithm\n      --sha3-512         SHA3-512 algorithm\n      --sha512           SHA512 algorithm\n      --sha512-256       SHA512-256 algorithm\n      --size             output size\n  -S, --status           don't output anything, status code shows success\n      --strict           exit non-zero for improperly formatted checksum lines\n  -s, --string           treat arguments as strings\n  -L, --symlinks         follow symbolic links while recursing directories\n  -v, --verbose          verbose operation\n      --version          show version and exit\n  -w, --warn             warn about improperly formatted checksum lines\n  -z, --zero             end each output line with NUL, not newline, and disable file name escaping\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardobranco777%2Fxhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricardobranco777%2Fxhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardobranco777%2Fxhash/lists"}