ppkey
v1.0.1
Published
Create and process public and private keys.
Downloads
7
Readme
ppkey
Create and process public and private keys with pure js.
Installation
$ npm install --save ppkey
Usage
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
$ 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