Gathering detailed insights and metrics for crypto-extra
Gathering detailed insights and metrics for crypto-extra
Gathering detailed insights and metrics for crypto-extra
Gathering detailed insights and metrics for crypto-extra
npm install crypto-extra
Typescript
Module System
Min. Node Version
Node Version
NPM Version
92.8
Supply Chain
100
Quality
75.7
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
5,941,056
Last Day
2,809
Last Week
11,906
Last Month
52,666
Last Year
1,540,445
14 Stars
83 Commits
1 Forks
4 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.1
Package Id
crypto-extra@1.0.1
Size
5.56 kB
NPM Version
6.9.0
Node Version
10.16.3
Publised On
22 Oct 2019
Cumulative downloads
Total Downloads
Last day
2.6%
2,809
Compared to previous day
Last week
-13.2%
11,906
Compared to previous week
Last month
7.5%
52,666
Compared to previous month
Last year
4.3%
1,540,445
Compared to previous year
7
Adds convenience methods to the native Node.js crypto module. It is a drop in replacement, and extends the original module functionality.
The native crypto
module can be a pain to work with, and requires a lot of boilerplate to do things such as randomizing and encryption. This abstracts all of that.
1$ npm install crypto-extra --save
To use in your project, simply require into your project as you would the crypto
module.
1const crypto = require("crypto-extra") 2 3crypto.randomString() 4//= L0e84MUt0n 5 6crypto.hash("hello") 7//= 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Encrypts a value with a secret key using AES-256-CTR.
value - The value you want to encrypt. Everything (except objects) is converted to a string before encryption for consistency. Objects are stringified using JSON.stringify
.
Type:
any
secretKey - The key used in the encryption. If not supplied, the lib will fallback to the environment variable ENCRYPTION_KEY
.
Type:
string
Default:process.env.ENCRYPTION_KEY
Decrypts a value using AES-256-CTR.
value - The encrypted value you want to decrypt. Will automatically parse objects that were encrypted.
Type:
string
secretKey - The key used in the encryption. If not supplied, the lib will fallback to the environment variable ENCRYPTION_KEY
.
Type:
string
Default:process.env.ENCRYPTION_KEY
Hashes a string with the provided algorithm.
value - The value you want to hash. Any non-string value is converted to a string before hashing for consistency.
Type:
string
options
rounds - The number of rounds to use when hashing.
Type:
integer
Default:1
salt - A string to be appended to the value before it is hashed.
Type:
string
algorithm - The hashing algorithm to use.
Type:
string
Default:SHA256
Generates a random 256-bit key that can be used as an encryption key.
length - The length of the key you want to generate. Must be an even number.
Type:
number
Default:32
Returns a random string of a defined length.
length - Length of the random string. Must be above 0.
Type:
integer
Default:10
charset - The character set to take from.
Type:
string
Default:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
Returns a random string within a defined range.
options
min - Minimum number of range. Must be a positive integer.
Type:
integer
Default:0
max - Maximum number of range. This cannot be higher than 9007199254740991
due to Javascript integer limits (http://mzl.la/1A1nVyU). If you need a number higher than this, consider using randomString with the charset 0123456789
instead.
Type:
integer
Default:9007199254740991
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/27 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 effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
45 existing vulnerabilities detected
Details
Score
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 Morecrypto-binary-extra
Assemble and disassemble binary messages used in cryptocoin applications
@cryptosheet/extract-spreadsheet-id
Extracts the google spreadsheet id from a given spreadsheet url
1broker-client
node.js wrapper for 1broker.com api, providing extra features
crypto-color-extracter
simple js crypto-currency primary color extractor util