Socket
Socket
Sign inDemoInstall

ssri

Package Overview
Dependencies
1
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.3 to 4.1.4

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="4.1.4"></a>
## [4.1.4](https://github.com/zkat/ssri/compare/v4.1.3...v4.1.4) (2017-05-31)
### Bug Fixes
* **node:** older versions of node[@4](https://github.com/4) do not support base64buffer string parsing ([513df4e](https://github.com/zkat/ssri/commit/513df4e))
<a name="4.1.3"></a>

@@ -7,0 +17,0 @@ ## [4.1.3](https://github.com/zkat/ssri/compare/v4.1.2...v4.1.3) (2017-05-24)

10

index.js
'use strict'
const Buffer = require('safe-buffer').Buffer
const crypto = require('crypto')

@@ -34,3 +36,3 @@ const Transform = require('stream').Transform

hexDigest () {
return this.digest && bufFrom(this.digest, 'base64').toString('hex')
return this.digest && Buffer.from(this.digest, 'base64').toString('hex')
}

@@ -158,3 +160,3 @@ toJSON () {

`${algorithm}-${
bufFrom(hexDigest, 'hex').toString('base64')
Buffer.from(hexDigest, 'hex').toString('base64')
}${optString}`, opts

@@ -337,5 +339,1 @@ )

}
function bufFrom (data, enc) {
return Buffer.from ? Buffer.from(data, enc) : new Buffer(data, enc)
}

6

package.json
{
"name": "ssri",
"version": "4.1.3",
"version": "4.1.4",
"description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",

@@ -39,3 +39,5 @@ "main": "index.js",

"license": "CC0-1.0",
"dependencies": {},
"dependencies": {
"safe-buffer": "^5.0.1"
},
"devDependencies": {

@@ -42,0 +44,0 @@ "nyc": "^10.3.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc