Notes
Notes copied to clipboard
node-rsa生成公钥私钥
const NodeRSA = require("node-rsa")
const key = new NodeRSA({b: 2048});
const publicDer = key.exportKey('pkcs1-public-pem'); //公钥
const privateDer = key.exportKey('pkcs1-private-pem');//私钥
console.log(publicDer,privateDer)