ssri
14.0.0 · 8 May 2026ISC47.5M / weekRepositoryHomepagenpmAtom feed
3.0.2 is the newest release of 3.x.
In short
3 breaking9 new1 fixed
- Breaking
hashes:
.isIntegrityMetadatais now.isHash. Also, any references toIntegrityMetadatanow refer toHash. - Breaking
integrityStream: createCheckerStream has been removed and replaced with a general-purpose integrityStream.
- Breaking
check:
checkData,checkStream, andcreateCheckerStreamnow yield a whole IntegrityMetadata instance representing the first successful hash match.
Security
1 advisory affects 3.0.0; 5.2.2 fixes them
- ModerateRegular Expression Denial of Service in ssriGHSA-325j-24f4-qv5x · 7 Mar 2018Fixed in 5.2.2
Release note
Bug Fixes
hashes: IntegrityMetadata -> Hash
Features
check: return IntegrityMetadata on check success
fromHex: ssri.fromHex to make it easier to generate them from hex valus
hex: utility function for getting hex version of digest
hexDigest: added hexDigest method to Integrity objects too
integrity: add .isIntegrity and .isIntegrityMetadata
integrityStream: new stream that can both generate and check streamed data
parse: allow parsing straight into a single IntegrityMetadata object
pickAlgorithm: Intergrity#pickAlgorithm() added
size: calculate and update stream sizes
Breaking changes
- Breaking
hashes:
.isIntegrityMetadatais now.isHash. Also, any references toIntegrityMetadatanow refer toHash. - Breaking
integrityStream: createCheckerStream has been removed and replaced with a general-purpose integrityStream.
To convert existing createCheckerStream code, move the sri argument into opts.integrity in integrityStream. All other options should be the same.
- Breaking
check:
checkData,checkStream, andcreateCheckerStreamnow yield a whole IntegrityMetadata instance representing the first successful hash match.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.