Gathering detailed insights and metrics for compare-timing-safe
Gathering detailed insights and metrics for compare-timing-safe
Gathering detailed insights and metrics for compare-timing-safe
Gathering detailed insights and metrics for compare-timing-safe
npm install compare-timing-safe
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
26 Commits
3 Watching
1 Branches
1 Contributors
Updated on 23 Oct 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-24.5%
117
Compared to previous day
Last week
-6.7%
715
Compared to previous week
Last month
37.4%
3,162
Compared to previous month
Last year
-36.1%
26,265
Compared to previous year
String comparison in length constant time
Works in node and in the browser.
Node version uses crypto
module.
timingSafeEqual(a, b)
String, buffer comparison in length-constant time
Example
1import timingSafeEqual from 'compare-timing-safe' 2const input = 'a' 3const compareWith = 'bbbbbbbb' 4timingSafeEqual(input, compareWith) 5//> false
Parameters
parameter | type | description |
---|---|---|
a | String, Buffer | String or buffer from input |
b | String, Buffer | String or buffer to compare with a |
Returns Boolean
, true if strings match
Requires nodejs.
1$ npm install compare-timing-safe
1$ npm test
Unlicense https://unlicense.org
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 0/19 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
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
Score
Last Scanned on 2024-11-25
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