0.2.1-unstable.20 • Published 4 years ago

@transmute/did-key-p384 v0.2.1-unstable.20

Weekly downloads
45
License
Apache-2.0
Repository
-
Last release
4 years ago

@transmute/did-key-p384

DEPRECATED.

Please use @transmute/did-key-web-crypto instead.

npm i @transmute/did-key-p384@latest --save

Usage

import { P384KeyPair } from '@transmute/did-key-p384';
const key = await P384KeyPair.generate();
const key = await P384KeyPair.from({
  privateKeyJwk: fixtures.privateKeyJwk,
});
const signer = key.signer();
const signature = await signer.sign({ data: fixtures.message });
const verifier = key.verifier();
const verified = await verifier.verify({ data: fixtures.message, signature });
expect(verified).toBe(true);
const secret = await key.deriveSecret({ publicKey });
// expect secret to be equivalent to web crypto deriveBits.

TODO

  • More documentation.