Use hash stream instead of crypto.createHash
crypto.createHash is a write stream but not a PassThrough stream!
This commit is contained in:
@@ -8,6 +8,7 @@ const assert = require('assert'),
|
||||
debug = require('debug')('box:backupformat/tgz'),
|
||||
{ DecryptStream, EncryptStream } = require('../hush.js'),
|
||||
fs = require('fs'),
|
||||
HashStream = require('../hash-stream.js'),
|
||||
path = require('path'),
|
||||
ProgressStream = require('../progress-stream.js'),
|
||||
promiseRetry = require('../promise-retry.js'),
|
||||
@@ -141,7 +142,7 @@ async function tarPack(dataLayout, encryption, uploader, progressCallback) {
|
||||
|
||||
const pack = tar.pack();
|
||||
|
||||
const hash = crypto.createHash('sha256');
|
||||
const hash = new HashStream();
|
||||
|
||||
let pipeline = null;
|
||||
if (encryption) {
|
||||
|
||||
Reference in New Issue
Block a user