{"id":25582488,"url":"https://github.com/btielen/dcc-wasm","last_synced_at":"2026-05-15T13:32:10.196Z","repository":{"id":44778977,"uuid":"450622446","full_name":"btielen/dcc-wasm","owner":"btielen","description":"Parse a European Digital Covid Certificate (DCC) with WebAssembly","archived":false,"fork":false,"pushed_at":"2022-01-25T11:26:43.000Z","size":200,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-12T04:54:48.817Z","etag":null,"topics":["certificate","covid-19","dcc","health","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/btielen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-21T19:53:45.000Z","updated_at":"2022-01-25T12:05:03.000Z","dependencies_parsed_at":"2022-08-25T11:31:32.333Z","dependency_job_id":null,"html_url":"https://github.com/btielen/dcc-wasm","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/btielen/dcc-wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btielen%2Fdcc-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btielen%2Fdcc-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btielen%2Fdcc-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btielen%2Fdcc-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btielen","download_url":"https://codeload.github.com/btielen/dcc-wasm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btielen%2Fdcc-wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33068400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["certificate","covid-19","dcc","health","wasm","webassembly"],"created_at":"2025-02-21T05:16:38.131Z","updated_at":"2026-05-15T13:32:10.168Z","avatar_url":"https://github.com/btielen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parse a digital covid certificate\n\n![types](https://img.shields.io/npm/types/dcc-wasm)\n![version](https://img.shields.io/npm/v/dcc-wasm)\n![licence](https://img.shields.io/npm/l/dcc-wasm)\n\nThis is a WebAssembly (wasm) package to parse a European Digital Covid Certificate (DCC). The\nsource is written in Rust, compiled to webassembly. Signatures are also being verified.\n\n## Installation\n\nUse your favourite package manager to use this package in your javascript projects.\n\n`npm install dcc-wasm --save`\n\n### webpack \u003e= 5\n\nAdd the following to `webpack.config.js`\n\n```\n{\n  module: {\n    rules: [\n      {\n        test: /\\.wasm$/,\n        type: 'webassembly/async',\n      }\n    ]\n  },\n  experiments: {\n    asyncWebAssembly: true\n  }\n}\n```\n\n\n## Getting started\n\nHere is an [example](https://runkit.com/embed/x23oumhrlx59) on how use this package\n\n```js\nimport { parse } from \"dcc-wasm\"\n\nconst parseResult = parse(\"HC1:6BFOXN*TS0BI$ZD-PHQ7I9AD66V5B22CH9M9ESI9XBHXK-%69LQOGI.*V76GCV4*XUA2P-FHT-HNTI4L6N$Q%UG/YL WO*Z7ON15 BM0VM.JQ$F4W17PG4.VAS5EG4V*BRL0K-RDY5RWOOH6PO9:TUQJAJG9-*NIRICVELZUZM9EN9-O9:PICIG805CZKHKB-43.E3KD3OAJ6*K6ZCY73JC3KD3ZQTWD3E.KLC8M3LP-89B9K+KB2KK3M*EDZI9$JAQJKKIJX2MM+GWHKSKE MCAOI8%MCU5VTQDPIMQK9*O7%NC.UTWA6QK.-T3-SY$NCU5CIQ 52744E09TBOC.UKMI$8R+1A7CPFRMLNKNM8JI0JPGN:0K7OOBRLY667SYHJL9B7VPO:SWLH1/S4KQQK0$5REQT5RN1FR%SHPLRKWJO8LQ84EBC$-P4A0V1BBR5XWB3OCGEK:$8HHOLQOZUJ*30Q8CD1\");\n\nif(!parseResult.successful || !parseResult.signature_valid) {\n  console.log(parseResult.error)\n}\n\nconsole.log(parseResult.data)\n```\n\nWould result in:\n\n```json\n{\n  \"1\": \"DE\",\n  \"4\": 1643356073,\n  \"6\": 1622316073,\n  \"-260\": {\n    \"1\": {\n      \"r\": [\n        {\n          \"ci\": \"URN:UVCI:01DE/5CWLU12RNOB9RXSEOP6FG8#W\",\n          \"is\": \"Robert Koch-Institut\",\n          \"co\": \"DE\",\n          \"tg\": \"840539006\",\n          \"fr\": \"2021-01-10\",\n          \"df\": \"2021-05-29\",\n          \"du\": \"2021-06-15\"\n        }\n      ],\n      \"dob\": \"1964-08-12\",\n      \"nam\": {\n        \"fn\": \"Mustermann\",\n        \"gn\": \"Erika\",\n        \"fnt\": \"MUSTERMANN\",\n        \"gnt\": \"ERIKA\"\n      },\n      \"ver\": \"1.0.0\"\n    }\n  }\n}\n```\n\nThe specifications of this data can be found [here](https://github.com/ehn-dcc-development/hcert-spec/blob/main/hcert_spec.md)\n\n## ParsingResult\n\n| Property        | Type    | Description                                           |\n|-----------------|---------|-------------------------------------------------------|\n| successful      | bool    | Will be true if the data could be parsed successfully |\n| signature_valid | bool    | Will be true if the signature could be verifyed       |\n| kid             | string  | Issuer identifier                                     |\n| algorithm       | number  | The algorithm to sign the data                        |\n| data            | unknown | The data in the health certificate                    |\n\n## Building from source\n1. Clone repository\n2. Install `wasm-pack` by running\n   `curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh`\n   in your terminal\n3. Run `wasm-pack build --target nodejs --outdir package/node` to build the wasm package for a nodejs environment\n4. Run `wasm-pack build --outdir package/webpack` to build the wasm package a browser package\n\n## Running tests\n\n### Rust\n\n- `wasm-pack test --node`\n- `wasm-pack test --firefox --headless`\n\n### Javascript\n\nFollow these steps from the root dir to run the javascript tests\n- `wasm-pack build --target nodejs --outdir package/node` to build\n- change directory to package `cd package`\n- `npm install`\n- `npm run test` to run the tests","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtielen%2Fdcc-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtielen%2Fdcc-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtielen%2Fdcc-wasm/lists"}