fd7b5164 by brandonocasey

removed const DecrypterStep and added it straight to Decrypter

1 parent c5245660
...@@ -366,12 +366,9 @@ export class AsyncStream extends Stream { ...@@ -366,12 +366,9 @@ export class AsyncStream extends Stream {
366 } 366 }
367 } 367 }
368 368
369 // the maximum number of bytes to process at one time
370 const DecrypterStep = 4 * 8000;
371
372 export class Decrypter { 369 export class Decrypter {
373 constructor(encrypted, key, initVector, done) { 370 constructor(encrypted, key, initVector, done) {
374 let step = DecrypterStep; 371 let step = Decrypter.STEP;
375 let encrypted32 = new Int32Array(encrypted.buffer); 372 let encrypted32 = new Int32Array(encrypted.buffer);
376 let decrypted = new Uint8Array(encrypted.byteLength); 373 let decrypted = new Uint8Array(encrypted.byteLength);
377 let i = 0; 374 let i = 0;
...@@ -408,7 +405,9 @@ export class Decrypter { ...@@ -408,7 +405,9 @@ export class Decrypter {
408 } 405 }
409 } 406 }
410 407
411 Decrypter.STEP = DecrypterStep; 408 // the maximum number of bytes to process at one time
409 // 4 * 8000;
410 Decrypter.STEP = 32000;
412 411
413 export default { 412 export default {
414 decrypt, 413 decrypt,
......