mirror of https://github.com/actions/toolkit
actually use md5 not sha256
parent
a3c696e88e
commit
35e5aac523
|
@ -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==')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue