exposure-keys
TypeScript icon, indicating that this package has built-in type declarations

1.8.3 • Public • Published

exposure-keys License: GPL v3 npm 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.

Installation

Run yarn add exposure-keys or npm install exposure-keys.

Usage

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));

Package Sidebar

Install

npm i exposure-keys

Weekly Downloads

20

Version

1.8.3

License

GPL-3.0

Unpacked Size

116 kB

Total Files

9

Last publish

Collaborators

  • ffflorian