Created
February 23, 2016 11:16
-
-
Save DSchougaard/1ada363449617940358d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generate an RSA key pair asynchronously (uses web workers if available) | |
// use workers: -1 to run a fast core estimator to optimize # of workers | |
rsa.generateKeyPair({bits: 2048, workers: 2}, function(err, keypair) { | |
// keypair.privateKey, keypair.publicKey | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment