Last chunk decryption.
This commit is contained in:
parent
d9b37f93c7
commit
3bc12919be
1 changed files with 10 additions and 2 deletions
|
@ -204,13 +204,21 @@ export const getFile = async (token: string, file: file) => {
|
|||
tag = newTag;
|
||||
data = buffer.slice(decryptionChunkSize);
|
||||
console.log('>', decryptionChunkSize, data.length, tag);
|
||||
console.log();
|
||||
} else {
|
||||
data = buffer;
|
||||
push();
|
||||
}
|
||||
} else {
|
||||
console.log('end', value.length);
|
||||
source.endOfStream();
|
||||
if (data) {
|
||||
const { decryptedData } = await worker.decryptChunk(data, pullState);
|
||||
sourceBuffer.appendBuffer(decryptedData);
|
||||
data = null;
|
||||
} else {
|
||||
// console.log('end', value.length);
|
||||
console.log(source);
|
||||
// source.endOfStream();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue