From b07671719cf22bdec17b645f226966125adc54c0 Mon Sep 17 00:00:00 2001 From: Abhinav Adduri Date: Thu, 13 Jul 2017 12:14:27 -0700 Subject: [PATCH] added comments for fraudulent checksum test case --- test/frontend/frontend.test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/frontend/frontend.test.js b/test/frontend/frontend.test.js index 2ec69bf3..af820bfe 100644 --- a/test/frontend/frontend.test.js +++ b/test/frontend/frontend.test.js @@ -273,9 +273,9 @@ describe('File Receiver', function() { }) }) - it('Should catch tampered checksums', function(done) { - // use the secret key and file hash of the previous file to encrypt, - // which has a different hash than this one (different strings) + it('Should catch fraudulent checksums', function(done) { + // Use the secret key and file hash of the previous file to encrypt, + // which has a different hash than this one (different strings). const newFile = new FakeFile('hello_world.txt', ['This is some data, with a changed hash.']) const readRaw = new FileReader(); @@ -297,6 +297,8 @@ describe('File Receiver', function() { ['encrypt', 'decrypt'] ) .then(key => { + // The file hash used here is the hash of the fake + // file from the previous test; it's a phony checksum. return window.crypto.subtle.encrypt( { name: 'AES-GCM',