mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-20 15:20:40 -04:00
integrating compression test case that failed in rawdeflate in webcrypto + zlib testing, proving this fixes #328
This commit is contained in:
parent
e77eb1de13
commit
5779d87788
2 changed files with 17 additions and 15 deletions
|
@ -174,6 +174,23 @@ describe('CryptTool', function () {
|
|||
});
|
||||
}
|
||||
);
|
||||
|
||||
it('does not truncate messages', async function () {
|
||||
let message = fs.readFileSync('test/compression-sample.txt', 'utf8'),
|
||||
clean = jsdom();
|
||||
window.crypto = new WebCrypto();
|
||||
let cipherMessage = await $.PrivateBin.CryptTool.cipher(
|
||||
'foo', 'bar', message, []
|
||||
),
|
||||
plaintext = await $.PrivateBin.CryptTool.decipher(
|
||||
'foo', 'bar', cipherMessage
|
||||
);
|
||||
clean();
|
||||
assert.strictEqual(
|
||||
message,
|
||||
plaintext
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getSymmetricKey', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue