1
0
Fork 0

actually use md5 not sha256

pull/1063/head
Rob Herley 2022-05-05 10:32:09 -04:00
parent a3c696e88e
commit 35e5aac523
No known key found for this signature in database
GPG Key ID: D1602042C3543B06
2 changed files with 2 additions and 2 deletions

View File

@ -234,6 +234,6 @@ describe('Utils', () => {
const digest = await utils.digestForStream(stream) const digest = await utils.digestForStream(stream)
expect(digest.crc64).toBe('bSzITYnW/P8=') expect(digest.crc64).toBe('bSzITYnW/P8=')
expect(digest.md5).toBe('Xiv1fT9AxLbfadrxk2y3ZvgyN0tPwCWafL/wbi9w8mk=') expect(digest.md5).toBe('gKdR/eV3AoZAxBkADjPrpg==')
}) })
}) })

View File

@ -309,7 +309,7 @@ export async function digestForStream(
): Promise<StreamDigest> { ): Promise<StreamDigest> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const crc64 = new CRC64() const crc64 = new CRC64()
const md5 = crypto.createHash('sha256') const md5 = crypto.createHash('md5')
stream stream
.on('data', data => { .on('data', data => {
crc64.update(data) crc64.update(data)