@cumulus/checksum
Advanced tools
Comparing version 1.11.2-alpha2 to 1.11.2-alpha3
@@ -23,3 +23,5 @@ 'use strict'; | ||
* | ||
* @param {string} algorithm - Checksum algorithm | ||
* @param {string} algorithm - algorithm to use for hash, | ||
* any algorithm accepted by node's `crypto.createHash` | ||
* https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options | ||
* @param {ReadableStream} fileStream - A readable file stream | ||
@@ -30,3 +32,3 @@ * @param {Object} options - Checksum options | ||
*/ | ||
async function _getChecksumFromStream(algorithm, fileStream, options) { | ||
async function _getChecksumFromStream(algorithm, fileStream, options = {}) { | ||
return new Promise((resolve, reject) => { | ||
@@ -33,0 +35,0 @@ const hash = crypto.createHash(algorithm, options); |
'use strict'; | ||
module.exports = require('./checksum'); | ||
const { generateChecksumFromStream } = require('./checksum'); | ||
const { validateChecksumFromStream } = require('./validate'); | ||
module.exports = { | ||
generateChecksumFromStream, | ||
validateChecksumFromStream | ||
}; |
{ | ||
"name": "@cumulus/checksum", | ||
"version": "1.11.2-alpha2", | ||
"description": "Cumulus checksum utlities", | ||
"version": "1.11.2-alpha3", | ||
"description": "Cumulus checksum utilities", | ||
"engines": { | ||
@@ -6,0 +6,0 @@ "node": ">=8.10.0" |
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
4454
5
79