@tanker/crypto
TypeScript icon, indicating that this package has built-in type declarations

4.1.1 • Public • Published

Tanker SDK (crypto)

License NPM Package Minified Size

This package is a dependency of the Tanker client SDKs for end-to-end encryption:

Read the documentation to get started.

Usage

Most functions in this package are synchronous, but you MUST ensure the underlying crypto library is ready before calling any of them:

import { ready, toString } from '@tanker/crypto';

const use = () => {
  const bytes = [104, 101, 108, 108, 111];
  const buffer = new Uint8Array(bytes);
  console.log(toString(buffer)); // 'hello'
};

// Either do:
ready.then(use);

// Or:
(async () => {
  await ready;
  use();
})();

Readme

Keywords

none

Package Sidebar

Install

npm i @tanker/crypto

Weekly Downloads

5,921

Version

4.1.1

License

Apache-2.0

Unpacked Size

695 kB

Total Files

267

Last publish

Collaborators

  • jmounier
  • maximerety
  • tankeradmin
  • quentin.vernot.tanker