🎨 Replace new Buffer() by Buffer.alloc()
This commit is contained in:
parent
1d1b8930cf
commit
26467816f0
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ import updateKeys from './lib/updateKeys';
|
||||||
export default function decryptChunk(encryptedChunk: Buffer, [key0, key1, key2]: [number, number, number]): Buffer {
|
export default function decryptChunk(encryptedChunk: Buffer, [key0, key1, key2]: [number, number, number]): Buffer {
|
||||||
const dv = new DataView(encryptedChunk.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);
|
const dvOut = new DataView(decryptedChunk.buffer);
|
||||||
|
|
||||||
for (let i = 0; i < encryptedChunk.length; i += 1) {
|
for (let i = 0; i < encryptedChunk.length; i += 1) {
|
||||||
|
|
Loading…
Reference in a new issue