1.0.3 • Published 6 years ago

node-genrsa v1.0.3

Weekly downloads
51
License
MIT
Repository
github
Last release
6 years ago

Generates a public/private keypair using openssl genrsa.

This module requires OpenSSL to be installed on the system.

Usage

import keyPair from 'node-genrsa';

const options = {
  bits: 1024,
  exponent: 65537
}
const keys = await keyPair(options);
console.log(keys.private);
console.log(keys.public);

Options

parameterdefaultdescription
bits2048The size of the private key to generate in bits
exponenet65537The public exponent to use, either 65537 or 3. The default is 65537.