Comparing version 4.1.3 to 4.1.4
@@ -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) | ||
} |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35248
1
315
+ Addedsafe-buffer@^5.0.1
+ Addedsafe-buffer@5.2.1(transitive)