fixed size limit on server to include crypto overhead
This commit is contained in:
parent
dce8b6e525
commit
7f9674f494
7 changed files with 24 additions and 11 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue