Published
Edited
Aug 12, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
ehc_decoded_data = {
const [, unpreffixed_data] = ehc_data.split("HC1:");
const decoded_data = base45.decode(unpreffixed_data);
const uncompressed_data = zlib.inflate(decoded_data);
const [headers1, headers2, cbor_data, signature] = cbor.decodeFirstSync(
uncompressed_data
).value;
const decrypted_data = cbor.decodeFirstSync(cbor_data).get(-260).get(1);

return decrypted_data;
}
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Insert cell
qr = require('bwip-js')
Insert cell
fhc = require('https://bundle.run/france-ehealth-certificates@1.0.4')
Insert cell
Table = require('https://bundle.run/table-layout@2.1.0')
Insert cell
flatten = import('https://cdn.skypack.dev/safe-flat@2.0.2?min')
Insert cell
base45 = require('https://bundle.run/base45@3.0.0')
Insert cell
cbor = require('https://bundle.run/cbor-web@8.0.1')
Insert cell
zlib = import('https://unpkg.com/pako@2.0.3/dist/pako.esm.mjs?module')
Insert cell
Insert cell
<style>
.data-preview {
max-width: max(70vw, 350px);
}

.data-preview code {
font-size: 1.6em;
white-space: pre-wrap;
word-break: break-word;
}
</style>
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more