diff --git a/src/ssn/decryption/decryptChunk.ts b/src/ssn/decryption/decryptChunk.ts index b41ca26..7113ad6 100644 --- a/src/ssn/decryption/decryptChunk.ts +++ b/src/ssn/decryption/decryptChunk.ts @@ -3,7 +3,7 @@ import updateKeys from './lib/updateKeys'; export default function decryptChunk(encryptedChunk: Buffer, [key0, key1, key2]: [number, number, number]): Buffer { const dv = new DataView(encryptedChunk.buffer); - const decryptedChunk = new Buffer(encryptedChunk.length); + const decryptedChunk = Buffer.alloc(encryptedChunk.length); const dvOut = new DataView(decryptedChunk.buffer); for (let i = 0; i < encryptedChunk.length; i += 1) {