Skip to content
/ rsa-long Public

RSA超长字符分段加解密,支持超过117个字符的加解密。

Notifications You must be signed in to change notification settings

S1ow/rsa-long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSA-LONG 分段加解密 20230331222444

更新说明

2020-12-29

  • 新增签名
  • 新增验签

2020-11-13

  • 更新打包方式

2020-11-12

  • 新增分段加密,按照最大支持字符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}`)

demo的使用

git clone https://github.com/S1ow/rsa-long.git
cd rsa-long/example
yarn install
node index.js

About

RSA超长字符分段加解密,支持超过117个字符的加解密。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published