Gathering detailed insights and metrics for rsa-encrypt-long
Gathering detailed insights and metrics for rsa-encrypt-long
Gathering detailed insights and metrics for rsa-encrypt-long
Gathering detailed insights and metrics for rsa-encrypt-long
npm install rsa-encrypt-long
Typescript
Module System
Node Version
NPM Version
TypeScript (82.46%)
CSS (17.17%)
JavaScript (0.37%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
42 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Apr 09, 2025
Latest Version
4.0.2
Package Id
rsa-encrypt-long@4.0.2
Unpacked Size
35.20 kB
Size
8.72 kB
File Count
11
NPM Version
10.8.2
Node Version
20.19.0
Published on
Apr 08, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
5
基于 jsencrypt
的 RSA 长数据加解密工具,支持 TypeScript。
1npm install rsa-encrypt-long --save
1import { Encrypt } from "rsa-encrypt-long"; 2 3// 方式一:初始化时直接传入密钥 4const encrypt = new Encrypt({ 5 publicKey: 'YOUR_PUBLIC_KEY', // 公钥 6 privateKey: 'YOUR_PRIVATE_KEY' // 私钥 7}); 8// 或者 9// 方式二:分步设置密钥 10const encrypt = new Encrypt(); 11encrypt.setPublicKey('YOUR_PUBLIC_KEY'); 12encrypt.setPrivateKey('YOUR_PRIVATE_KEY'); 13 14// 加密示例 15const data = "需要加密的数据"; 16const encrypted_text = encrypt.encryptLong(data); 17console.log('加密结果:', encrypted_text); 18 19// 解密示例 20const decrypted_text = encrypt.decryptLong(encrypted_text); 21console.log('解密结果:', decrypted_text);
setPublicKey(pubkey: string): void
- 设置 RSA 公钥setPrivateKey(privkey: string): void
- 设置 RSA 私钥getPublicKey(): string
- 获取 PEM 格式公钥getPrivateKey(): string
- 获取 PEM 格式私钥encryptLong(data: string): string
- RSA 长数据加密decryptLong(encrypted: string): string
- RSA 长数据解密encrypt(data: string): string
- 标准 RSA 加密decrypt(encrypted: string): string
- 标准 RSA 解密sign(data: string, digestMethod: (str: string) => string, digestName: string): string | false
- 数字签名verify(data: string, signature: string, digestMethod: (str: string) => string): boolean
- 签名验证No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More