fixed last chunk not being decrypted under certain conditions
This commit is contained in:
parent
ea88be5762
commit
71b9b7f23f
File diff suppressed because one or more lines are too long
2
index.js
2
index.js
|
@ -394,7 +394,7 @@ async function pipeDecryptedStream(writer, body, length, cipher, fixed_range_sta
|
||||||
|
|
||||||
let chunk = (await reader.readAtLeast(min_bytes, new Uint8Array(2048))).value
|
let chunk = (await reader.readAtLeast(min_bytes, new Uint8Array(2048))).value
|
||||||
|
|
||||||
if (byte_count % 6144 === 0 && !end) {
|
if (byte_count % 6144 === 0 && min_bytes == 2048) {
|
||||||
// encrypted chunk
|
// encrypted chunk
|
||||||
cipher.decrypt_chunk(chunk)
|
cipher.decrypt_chunk(chunk)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue