{"id":18645872,"url":"https://github.com/interledger/httpbis-digest-headers","last_synced_at":"2026-07-29T22:31:40.127Z","repository":{"id":60394779,"uuid":"540485397","full_name":"interledger/httpbis-digest-headers","owner":"interledger","description":"TS Library to create and verify a Content-Digest header.","archived":false,"fork":false,"pushed_at":"2023-06-06T05:35:49.000Z","size":393,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-19T22:04:05.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/interledger.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":"2022-09-23T14:42:43.000Z","updated_at":"2023-10-23T11:24:22.000Z","dependencies_parsed_at":"2024-11-14T21:51:02.096Z","dependency_job_id":null,"html_url":"https://github.com/interledger/httpbis-digest-headers","commit_stats":{"total_commits":8,"total_committers":3,"mean_commits":"2.6666666666666665","dds":0.5,"last_synced_commit":"787b7af5ba1752337d696a7b1587193058173284"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/interledger/httpbis-digest-headers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fhttpbis-digest-headers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fhttpbis-digest-headers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fhttpbis-digest-headers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fhttpbis-digest-headers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledger","download_url":"https://codeload.github.com/interledger/httpbis-digest-headers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fhttpbis-digest-headers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36052204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-29T02:00:04.910Z","response_time":95,"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":"2024-11-07T06:17:31.410Z","updated_at":"2026-07-29T22:31:40.100Z","avatar_url":"https://github.com/interledger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP Digest Headers\r\n\r\n[![Node.js CI](https://github.com/interledger/httpbis-digest-headers/actions/workflows/nodejs.yml/badge.svg)](https://github.com/interledger/httpbis-digest-headers/actions/workflows/nodejs.yml)\r\n\r\nBased on the draft specification for HTTP Digest Headers, this library facilitates the creation and verification of a Content-Digest header.\r\n\r\nThis is useful when verifying the content of a message body as part of signature verification.\r\n\r\n## Specifications\r\n\r\n- [HTTPBIS-DIGEST-HEADERS](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-digest-headers)\r\n\r\nThe library currently only supports sha-256 and sha-512 algorithms\r\n\r\n## Examples\r\n\r\n### Creating a digest header\r\n\r\n```js\r\nimport { createContentDigestHeader } from 'httpbis-digest-headers';\r\nrequest.setHeader('Content-Digest', createContentDigestHeader(messageBody, ['sha-256']))\r\n```\r\n\r\n### Verify a digest header\r\n\r\n```js\r\nimport { verifyContentDigest } from 'httpbis-digest-headers';\r\nconst server = http.createServer(async (req, res) =\u003e {\r\n  const buffers = [];\r\n\r\n  for await (const chunk of req) {\r\n    buffers.push(chunk);\r\n  }\r\n  const verified = verifyContentDigest(Buffer.concat(buffers), req.getHeader('Content-Digest'))\r\n});\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger%2Fhttpbis-digest-headers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledger%2Fhttpbis-digest-headers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger%2Fhttpbis-digest-headers/lists"}