# keybase-sign

> Sign a message given a private key

Latest version **2.0.0** (published 2017-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install keybase-sign
pnpm add keybase-sign
yarn add keybase-sign
bun add keybase-sign
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-03-31 |
| First published | 2017-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jose Aguinaga |
| Maintainers | jjperezaguinaga |
| Keywords | keybase, kbpgp, pgp, crypto, gpg |

## Links

- npm: https://www.npmjs.com/package/keybase-sign
- Repository: https://github.com/jjperezaguinaga/keybase-sign
- Homepage: https://github.com/jjperezaguinaga/keybase-sign#readme
- Issues: https://github.com/jjperezaguinaga/keybase-sign/issues
- npm.io page: https://npm.io/package/keybase-sign

## Dependencies (3)

- [kbpgp](https://npm.io/package/kbpgp.md) ^2.0.59
- [bluebird](https://npm.io/package/bluebird.md) ^3.4.6
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.18.0

## Recent versions

- 2.0.0 (latest) — 2017-03-31

## README

# keybase-sign [![Build Status](https://img.shields.io/travis/jjperezaguinaga/keybase-sign/master.svg?style=flat-square)](https://travis-ci.org/jjperezaguinaga/keybase-sign)
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)


🔑  Using kbpgp to sign messages with on a private key

## Install

```bash
$ npm install keybase-sign --save
```

## Usage

```js
const sign = require('keybase-sign')

const privateKey =  `-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: Keybase OpenPGP v2.0.66
Comment: https://keybase.io/crypto

xcaGBFjc/2UBEADIuWmIzZNn5ZXLSs5juV+yi2RIsCqHtotcjJ/g4QqKaw4vpFYa
...
`

const message = 'This is a test'
const passphrase = 'password' // Only required if private key is locked

try {
  sign(privateKey, message, passphrase).then(detachedSignature => {
    console.log(detachedSignature)
    /*
    -----BEGIN PGP MESSAGE-----
    Version: Keybase OpenPGP v2.0.68
    Comment: https://keybase.io/crypto
    
    yMCQAnicAUQBu/7EDQMACgFK7D7a1hCEhQHLFHUAWN58I1RoaXMgaXMgYSB0ZXN0
    ...
    -----END PGP MESSAGE-----
    */
  })
} catch(err) {
    console.log('There was an error signing', err)
}


```

## Related

[E.nigma](https://github.com/jjperezaguinaga/e.nigma.pw) - 🔐 e.nigma.pw / Encryption toolbox utility

## License

MIT © [Jose Aguinaga](https://jjperezaguinaga.com)

---
_Source: https://npm.io/package/keybase-sign · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
