https://github.com/udoschneider/vacdec
A simple elixir library to parse the EU Covid-19 vaccine certificate.
https://github.com/udoschneider/vacdec
elixir
Last synced: 8 months ago
JSON representation
A simple elixir library to parse the EU Covid-19 vaccine certificate.
- Host: GitHub
- URL: https://github.com/udoschneider/vacdec
- Owner: udoschneider
- Created: 2021-11-09T11:42:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-09T11:48:23.000Z (over 4 years ago)
- Last Synced: 2025-02-15T08:31:05.793Z (over 1 year ago)
- Topics: elixir
- Language: Elixir
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vacdec
A simple elixir library to parse the EU Covid-19 vaccine certificate, as [specified by the EU](https://ec.europa.eu/health/ehealth/covid-19_en).
Based on https://github.com/hannob/vacdec .
**It will not validate the signature.**
The code is very short and should provide an easy way to understand
how these certificates are encoded:
* The QR code encodes a string starting with "HC1:".
* The string following "HC1:" is base45 encoded.
* Decoding the base45 leads to zlib-compressed data.
* Decompression leads to a CBOR Web Token structure.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `vacdec` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:vacdec, "~> 0.1.0"}
]
end
```
Unless published in hex you can directly reference the git repo:
```elixir
def deps do
[
{:vacdec, git: "https://github.com/udoschneider/vacdec.git"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/vacdec](https://hexdocs.pm/vacdec).