mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 06:00:53 +03:00
fixed size limit on server to include crypto overhead
This commit is contained in:
@@ -6,6 +6,7 @@ import Archive from '../../../app/archive';
|
||||
import { b64ToArray } from '../../../app/utils';
|
||||
import { blobStream, concatStream } from '../../../app/streams';
|
||||
import { decryptStream, encryptStream } from '../../../app/ece.js';
|
||||
import { encryptedSize } from '../../../app/utils';
|
||||
|
||||
const rs = 36;
|
||||
|
||||
@@ -101,4 +102,10 @@ describe('Streaming', function() {
|
||||
assert.deepEqual(result, decrypted);
|
||||
});
|
||||
});
|
||||
|
||||
describe('encryptedSize', function() {
|
||||
it('matches the size of an encrypted buffer', function() {
|
||||
assert.equal(encryptedSize(buffer.length, rs), encrypted.length);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user