This repository has been archived by the owner on Feb 5, 2023. It is now read-only.
exposure-keys 1.3.3
Install from the command line:
Learn more about npm packages
$ npm install @ffflorian/exposure-keys@1.3.3
Install via package.json:
"@ffflorian/exposure-keys": "1.3.3"
About this version
A library to load Temporary Exposure Keys (TEK). For more information on the format see https://developers.google.com/android/exposure-notifications/exposure-key-file-format.
Run yarn add exposure-keys
or npm install exposure-keys
.
import * as fs from 'fs';
import {loadZip, loadKeys, loadSignature} from 'exposure-keys';
(async () => {
const zippedData = await fs.promises.readFile('2019-06-24.bin');
const unzippedData = await loadZip(zippedData);
const keys = loadKeys(unzippedData.keys);
const signature = loadSignature(unzippedData.signature);
// ...
})().catch(error => console.error(error));