{"id":51411587,"url":"https://github.com/excelano/quickxorhash","last_synced_at":"2026-07-04T15:01:59.999Z","repository":{"id":367365533,"uuid":"1280487102","full_name":"excelano/quickxorhash","owner":"excelano","description":"Microsoft QuickXorHash (SharePoint / OneDrive content hash) for Go — pure stdlib, implements hash.Hash","archived":false,"fork":false,"pushed_at":"2026-06-25T16:35:29.000Z","size":10,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-25T18:20:19.726Z","etag":null,"topics":["go","golang","hash","microsoft-graph","onedrive","quickxorhash","sharepoint"],"latest_commit_sha":null,"homepage":null,"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/excelano.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":"SECURITY.md","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-25T16:24:13.000Z","updated_at":"2026-06-25T16:36:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/excelano/quickxorhash","commit_stats":null,"previous_names":["excelano/quickxorhash"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/excelano/quickxorhash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fquickxorhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fquickxorhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fquickxorhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fquickxorhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/excelano","download_url":"https://codeload.github.com/excelano/quickxorhash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excelano%2Fquickxorhash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35125718,"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-04T02:00:05.987Z","response_time":113,"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":["go","golang","hash","microsoft-graph","onedrive","quickxorhash","sharepoint"],"created_at":"2026-07-04T15:01:59.085Z","updated_at":"2026-07-04T15:01:59.992Z","avatar_url":"https://github.com/excelano.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# quickxorhash\n\nA pure-Go implementation of Microsoft's QuickXorHash, the content hash that SharePoint Online and OneDrive for Business report for every file. It implements the standard library `hash.Hash` interface and has no dependencies beyond the Go standard library.\n\nMicrosoft Graph returns the digest for a file in the `file.hashes.quickXorHash` field of a driveItem. Computing the same hash locally lets a client tell whether a file already matches the copy stored in a document library without downloading it — the problem this package was written to solve, for an rsync-style SharePoint mirror that could not rely on timestamps surviving an upload.\n\n## Install\n\n```\ngo get github.com/excelano/quickxorhash\n```\n\n## Use\n\nThe value returned by `New` is a `hash.Hash`, so it streams like `crypto/sha1` or `hash/crc32`. Graph encodes the digest with standard base64, so compare against that:\n\n```go\nimport (\n\t\"encoding/base64\"\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/excelano/quickxorhash\"\n)\n\nfunc localHash(path string) (string, error) {\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer f.Close()\n\n\th := quickxorhash.New()\n\tif _, err := io.Copy(h, f); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn base64.StdEncoding.EncodeToString(h.Sum(nil)), nil\n}\n```\n\nFor a one-shot hash of a byte slice already in memory, `quickxorhash.Sum` returns the raw 20-byte digest:\n\n```go\nsum := quickxorhash.Sum(data) // [20]byte\nb64 := base64.StdEncoding.EncodeToString(sum[:])\n```\n\n## About the algorithm\n\nQuickXorHash is a 160-bit hash that XORs the input into a rotating bit accumulator and folds the total length into the result. It is defined by Microsoft and described in the OneDrive developer documentation. This is an independent implementation from that description, verified against digests captured directly from Microsoft Graph (see the test vectors).\n\n## License\n\nMIT. Built by David M. Anderson with AI assistance (Claude, Anthropic).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcelano%2Fquickxorhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcelano%2Fquickxorhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcelano%2Fquickxorhash/lists"}