Generate an RSA keypair.
npm install --save generate-rsa-keypair
var generateRSAKeypair = require('generate-rsa-keypair')
var pair = generateRSAKeypair()
console.log(pair.private) // String with the private key in PEM format
console.log(pair.public) // String with the public key in PEM format
Return a keypair, an object with two strings: private
and public
.
MIT