0.2.1-unstable.20 • Published 4 years ago
@transmute/did-key-p384 v0.2.1-unstable.20
@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.
0.2.1-unstable.19
4 years ago
0.2.1-unstable.20
4 years ago
0.2.1-unstable.18
4 years ago
0.2.1-unstable.17
4 years ago
0.2.1-unstable.16
4 years ago
0.2.1-unstable.15
4 years ago
0.2.1-unstable.14
4 years ago
0.2.1-unstable.13
4 years ago
0.2.1-unstable.12
4 years ago
0.2.1-unstable.11
4 years ago
0.2.1-unstable.10
4 years ago
0.2.1-unstable.9
4 years ago
0.2.1-unstable.8
4 years ago
0.2.1-unstable.7
4 years ago