Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-a/ppkey
Last synced: about 5 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/s-a/ppkey
- Owner: s-a
- License: mit
- Created: 2016-10-06T17:04:08.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-06T17:51:43.000Z (about 8 years ago)
- Last Synced: 2024-08-09T16:36:59.803Z (3 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ppkey [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> Create and process public and private keys with pure js.## Installation
```sh
$ npm install --save ppkey
```## Usage
```js
var ppkey = require('ppkey');
var username = "deployager";
var client = new Crypt();
client.loadKeys({private: "./test/key_rsa", passphrase: "deployager"});
var encryptedTextForHandShake = client.encrypt(username);var server = new Crypt();
server.loadKeys({public : "./test/key_rsa.pem"});
console.log(server.verify(username, encryptedTextForHandShake));
// yields => true
```
## Create public and private keys
```sh
$ ssh-keygen[.exe] -b 1024 -t rsa -f c:\temp\key.pub -e -m pem;
$ ssh-keygen[.exe] -b 1024 -t rsa -f c:\temp\key.pub -e -m pem > key.pem;
```## License
MIT © [s-a](https://github.com/s-a)
[npm-image]: https://badge.fury.io/js/ppkey.svg
[npm-url]: https://npmjs.org/package/ppkey
[travis-image]: https://travis-ci.org/s-a/ppkey.svg?branch=master
[travis-url]: https://travis-ci.org/s-a/ppkey
[daviddm-image]: https://david-dm.org/s-a/ppkey.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/s-a/ppkey
[coveralls-image]: https://coveralls.io/repos/github/s-a/ppkey/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/r/s-a/ppkey