Installations
npm install pandora-crypto-browserify
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
14.20.0
NPM Version
9.6.7
Score
67.4
Supply Chain
90.6
Quality
75.4
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (100%)
Developer
kingller
Download Statistics
Total Downloads
4,766
Last Day
3
Last Week
26
Last Month
131
Last Year
1,730
GitHub Statistics
4 Commits
2 Watching
1 Branches
1 Contributors
Bundle Size
27.64 kB
Minified
9.64 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.0
Package Id
pandora-crypto-browserify@1.1.0
Unpacked Size
6.30 kB
Size
2.68 kB
File Count
9
NPM Version
9.6.7
Node Version
14.20.0
Publised On
13 Oct 2023
Total Downloads
Cumulative downloads
Total Downloads
4,766
Last day
-62.5%
3
Compared to previous day
Last week
-39.5%
26
Compared to previous week
Last month
147.2%
131
Compared to previous month
Last year
43%
1,730
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
2
pandora-crypto-browserify
Javascript Crypto Library for AES and sha256 for browser
Install
1npm install pandora-crypto-browserify
Usage
AES
AES 加密解密。默认使用gcm
模式。
createKey 生成密钥
1import Crypto from 'pandora-crypto-browserify'; 2 3Crypto.AES.createKey();
使用该方法生成密钥后,会缓存该密钥,使用加密(encrypt)或解密(decrypt)方法时也可不提供密钥。
encrypt 加密
1import Crypto from 'pandora-crypto-browserify'; 2 3Crypto.AES.encrypt(data, '密钥');
该方法会先执行JSON.stringify(data),将数据转为json格式的字符串,然后使用AES加密。
decrypt 解密
1import Crypto from 'pandora-crypto-browserify'; 2 3Crypto.AES.decrypt('encrypted message', '密钥');
该方法会使用AES解密,再执行JSON.parse,获取数据。
getKey 获取密钥
1import Crypto from 'pandora-crypto-browserify'; 2 3Crypto.AES.getKey();
setKey 设置密钥
1import Crypto from 'pandora-crypto-browserify'; 2 3Crypto.AES.setKey('密钥');
clearKey 清除密钥
1import Crypto from 'pandora-crypto-browserify'; 2 3Crypto.AES.clearKey();
SHA256
1import Crypto from 'pandora-crypto-browserify'; 2 3Crypto.SHA256('message');
代码示例
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
1 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.9
/10
Last Scanned on 2025-01-27
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