Gathering detailed insights and metrics for derived-key-storage
Gathering detailed insights and metrics for derived-key-storage
npm install derived-key-storage
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
60,632
Last Day
4
Last Week
28
Last Month
112
Last Year
2,652
19 Stars
8 Commits
2 Forks
5 Watching
2 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
derived-key-storage@2.1.0
Unpacked Size
7.17 kB
Size
2.65 kB
File Count
5
NPM Version
6.13.7
Node Version
13.9.0
Cumulative downloads
Total Downloads
Last day
-20%
4
Compared to previous day
Last week
7.7%
28
Compared to previous week
Last month
-35.6%
112
Compared to previous month
Last year
-40.4%
2,652
Compared to previous year
3
Derive a key and secret key file from a name.
npm install derived-key-storage
1const derivedStorage = require('derived-key-storage') 2const raf = require('random-access-file') 3 4const { key, secretKey } = derivedStorage(name => raf(name), (name, cb) => { 5 // derive your keypair here ... 6 // if name is null, this keypair is fresh, otherwise derive from that name 7 // you can optionally return a secret key without a name, and that will be stored instead. 8 cb(null, { 9 name, 10 publicKey, 11 secretKey 12 }) 13}) 14 15key.read(0, 32, (err, buf) => { 16 console.log('public key is', err, buf) 17})
{ key, secretKey } = derivedStorage(storage, deriver)
Create a new key pair instance. Returns two random-access-storage instances, one for the public key and one for the secret key. The storage function you pass in will be used to store the name of the keypair. The deriver function should look like this:
function (name, cb) {
cb(null, {
name,
publicKey,
secretKey
})
}
Where name
is a buffer or null containing the name of the keypair. If the name is null you need to return the name of the keypair
back to the callback as it still will be written along with a length prefix to the storage you pass in.
If you do not with to derive your secret key from a name, you can override the derivation by returning a secret key and a null
name from this function.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
3 existing vulnerabilities detected
Details
Reason
Found 1/8 approved changesets -- score normalized to 1
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
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-13
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