Hello friends,
here an extension to decode the COVID-19 EU QR Certificate, also called QR Green Pass. It's a demo, have a Toast. I have published this extension on my website in Spanish and I adapt it to this Community.
0.- About EU QR Certificate. Green Pass.
In some European countries, those vaccinated against COVID-19 (also those who have been recovered and those who have undergone a test) are given a QR code called the EU QR Certificate or QR Green Pass.
-
In this QR code you will find data such as the user's name, their date of birth, when they were vaccinated, when the code expires, type of vaccine...
-
The code specifications are in this pdf document:
https://ec.europa.eu/health/sites/default/files/ehealth/docs/covid-certificate_json_specification_en.pdf
To decode the QR, we obtain its text that comes in BASE45 compressed with zlib and after other decodes we convert it into JSON
QR code Image -> QR DECODER -> QR-decoded string -> BASE45 decoder -> zlib compressed string -> COSE string -> CBOR decoder -> JSON file
-
Let's see this information: https://ehealth.vyncke.org/
-
Here is an example of data output: https://gir.st/blog/greenpass.html
-
The certificate can contain three types of data
r: if the patient has recovered.
t: if the patient has COVID test.
v: if the patient is vaccinated. -
HERE QR EXAMPLES: In the following example we observe several QRs of the same person, but with different certificates, r, t and v.
https://github.com/eu-digital-green-certificates/dgc-testdata/tree/main/IT -
To build the extension I have used this code:
https://gae-piaz.medium.com/decode-the-eu-green-pass-qrcode-using-java-b5654e55b0fc
github. com/GaetanoPiazzolla/greenpass-decode/blob/master/src/main/java/com/tano/green/Main.java