简体   繁体   中英

Python's RSA.import-key to nodejs

RSA.import_key(b64encode(data))

It's Python code. I want to change this code to nodejs. help me pls.

I suggest reading the documentation for the crypto module in NodeJS. Lots of methods directly accept private keys as Buffers, while there's also eg crypto.createPrivateKey you can use. Since security is an important topic, you're better off going through this module and carefully pick what suits your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM