keypair
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "keypair", | ||
"description": "Generate a RSA PEM key pair from pure JS", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"repository": { | ||
@@ -46,3 +46,3 @@ "type": "git", | ||
}, | ||
"license": "MIT" | ||
"license": "BSD / GPL" | ||
} |
@@ -5,6 +5,7 @@ # keypair | ||
[![Build Status](https://travis-ci.org/juliangruber/keypair.svg?branch=master)](https://travis-ci.org/juliangruber/keypair) | ||
[![downloads](https://img.shields.io/npm/dm/keypair.svg)](https://www.npmjs.org/package/keypair) | ||
[![browser support](https://ci.testling.com/juliangruber/keypair.png)](https://ci.testling.com/juliangruber/keypair) | ||
[![Build Status](https://travis-ci.org/juliangruber/keypair.png?branch=master)](https://travis-ci.org/juliangruber/keypair) | ||
## Usage | ||
@@ -27,2 +28,21 @@ | ||
## Performance | ||
Performance greatly depends on the bit size of the generated private key. With 1024 bits you get a key in 0.5s-2s, with 2048 bits it takes 8s-20s, on the same machine. As this will block the event loop while generating the key, | ||
make sure that's ok or to spawn a child process or run it inside a webworker. | ||
## Pro Tip: authorized_keys | ||
@maxogden found out how to use this module to create entries for the `authorized_keys` file: | ||
```js | ||
var keypair = require('keypair'); | ||
var forge = require('node-forge'); | ||
var pair = keypair(); | ||
var publicKey = forge.pki.publicKeyFromPem(pair.public); | ||
var ssh = forge.ssh.publicKeyToOpenSSH(publicKey, 'user@domain.tld'); | ||
console.log(ssh); | ||
``` | ||
## API | ||
@@ -55,2 +75,2 @@ | ||
BSD | ||
BSD / GPL |
Copyleft License
License(Experimental) Copyleft license information was found
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found
Found 1 instance in 1 package
146381
2
74