Skip to content

Latest commit

 

History

History

exposure-keys

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 'node: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));