- 新增签名
- 新增验签
- 更新打包方式
- 新增分段加密,按照最大支持字符117进行分段
- 新增分段解密,按照128字符进行分段解密
- 新增demo演示
npm install rsa-long
const rsaLong = require('rsa-long');
const pubK = "公钥"
let str = "待加密字符串"
let encryptData = rsaLong.encryptLong(pubK, str)
console.log(`加密后:${encryptData}`)
const priK = "私钥"
let str = "待解密的字符串"
let decData = rsaLong.decryptLong(priK, str)
console.log(`解密后:${decData}`)
git clone https://github.com/S1ow/rsa-long.git
cd rsa-long/example
yarn install
node index.js