0.3.1 • Published 2 years ago

node-signify v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

node-signify

node-signify is a Node.js port of OpenBSD's signify(1) written in TypeScript. It provides various APIs for manipulating signify keys and signatures which allow it to be integrated to other Node.js packages.

Install

$ npm install node-signify

Usage

Generate a key pair

See examples/generate-key-pair.ts.

import { generateKeyPair } from "node-signify";

let keyPair = generateKeyPair({
  passphrase: "passphrase",
});

Sign

See examples/sign.ts.

import { sign } from "node-signify";

let signature = sign({
  privateKey: PRIVATE_KEY,
  message: "[mock message]" + "\n",
  passphrase: "passphrase",
  comment: "verify with mock-key.pub",
});

Verify

See examples/verify.ts.

import { verify } from "node-signify";

let verified = verify({
  signature: SIGNATURE,
  message: "[mock message]" + "\n",
  publicKey: PUBLIC_KEY,
});

Contributions

Contributions are welcome. Submit a pull request on GitHub or send a patch to hirokio@tutanota.com.

License

See LICENSE.

0.3.1

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago