cpp_rsa

1.0.0 • Public • Published

#cpp_rsa C++ rsa 加密解密

How to use the code

npm i cpp_rsa

var addon = require('bindings')('cpp_rsa'); let nodes = new addon.NODES( __dirname + "/rsa_public_key.pem", __dirname + "/rsa_private_key.pem"); let p1 = nodes.publicEncrypt("123456789") let w1 = nodes.privateDecrypt(p1) console.log("data", p1, w1)

let p2 = nodes.privateEncrypt("123456789") let w2 = nodes.publicDecrypt(p2) console.log("data2", p2, w2)

##环境准备 cmake cmake-js opencv curl curl -O http://static-res.haizitong.com/nodejs/cmake-3.3.2.tar.gz tar xzvf cmake-3.3.2.tar.gz cd cmake-3.3.2 ./bootstrap gmake make install

cd ../../

apt install libcrypto++-dev

npm i -g cmake-js ln -s /opt/node/bin/cmake-js /usr/local/bin/cmake-js

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.01latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.01

Package Sidebar

Install

npm i cpp_rsa

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

20.6 kB

Total Files

13

Last publish

Collaborators

  • wuyunpeng