Notes icon indicating copy to clipboard operation
Notes copied to clipboard

node-rsa生成公钥私钥

Open any86 opened this issue 4 years ago • 0 comments

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)

any86 avatar Feb 24 '21 01:02 any86