Phase 1: Add ESLint/Prettier config + baseline auto-fixes
This commit is contained in:
@@ -43,14 +43,14 @@ describe('encrypt / decrypt', () => {
|
||||
test('throws on tampered ciphertext', () => {
|
||||
const encrypted = cryptoUtils.encrypt('test');
|
||||
const parts = encrypted.split(':');
|
||||
parts[2] = 'AAAA' + parts[2].slice(4); // tamper with ciphertext
|
||||
parts[2] = `AAAA${ parts[2].slice(4)}`; // tamper with ciphertext
|
||||
expect(() => cryptoUtils.decrypt(parts.join(':'))).toThrow();
|
||||
});
|
||||
|
||||
test('throws on tampered authTag', () => {
|
||||
const encrypted = cryptoUtils.encrypt('test');
|
||||
const parts = encrypted.split(':');
|
||||
parts[1] = 'AAAA' + parts[1].slice(4); // tamper with auth tag
|
||||
parts[1] = `AAAA${ parts[1].slice(4)}`; // tamper with auth tag
|
||||
expect(() => cryptoUtils.decrypt(parts.join(':'))).toThrow();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user