diff --git a/dev_deps.ts b/dev_deps.ts index d09ca92..a623792 100644 --- a/dev_deps.ts +++ b/dev_deps.ts @@ -1,11 +1,11 @@ export { parse as parseArgs } from "https://deno.land/std@0.194.0/flags/mod.ts"; export { assertEquals, - assertThrows + assertThrows, } from "https://deno.land/std@0.194.0/testing/asserts.ts"; export { bench, - runBenchmarks + runBenchmarks, } from "https://deno.land/std@0.92.0/testing/bench.ts"; // export { // decodeString as decodeHex, diff --git a/src/utils/bytes.ts b/src/utils/bytes.ts index d17d3d0..88eece9 100644 --- a/src/utils/bytes.ts +++ b/src/utils/bytes.ts @@ -9,4 +9,4 @@ export function bytesToWords(bytes: Uint8Array): Uint32Array { words[i] = dataView.getUint32(i * 4); } return words; -} \ No newline at end of file +} diff --git a/tests/aes.test.ts b/tests/aes.test.ts index b120b5d..91358c2 100644 --- a/tests/aes.test.ts +++ b/tests/aes.test.ts @@ -93,4 +93,4 @@ Deno.test("[Block Cipher] AES-128 2.0", () => { aes.decryptBlock(dataView, 0); assertEquals(data, decodeHex(plaintext)); } -}); \ No newline at end of file +}); diff --git a/tests/block-modes.test.ts b/tests/block-modes.test.ts index 3d502d2..9a15738 100644 --- a/tests/block-modes.test.ts +++ b/tests/block-modes.test.ts @@ -1,10 +1,6 @@ import { Aes } from "../aes.ts"; import { Cbc, Cfb, Ctr, Ecb, Ofb } from "../block-modes.ts"; -import { - assertEquals, - assertThrows, - decodeHex -} from "../dev_deps.ts"; +import { assertEquals, assertThrows, decodeHex } from "../dev_deps.ts"; const key = new Uint8Array(16); const iv = new Uint8Array(16); @@ -19,7 +15,7 @@ Deno.test("[Block Cipher Mode] Base", () => { cipher.decrypt(new Uint8Array(4)); }, Error, - "Invalid data size (must be multiple of 16 bytes)" + "Invalid data size (must be multiple of 16 bytes)", ); assertThrows( @@ -28,7 +24,7 @@ Deno.test("[Block Cipher Mode] Base", () => { cipher.encrypt(new Uint8Array(4)); }, Error, - "Invalid initialization vector size (must be 16 bytes)" + "Invalid initialization vector size (must be 16 bytes)", ); }); @@ -81,10 +77,8 @@ Deno.test("[Block Cipher Mode] ECB", () => { const dec = cipher.decrypt(enc); assertEquals(dec, plain); } - }); - Deno.test("[Block Cipher Mode] CBC", () => { const cipher = new Cbc(Aes, key, iv); const decipher = new Cbc(Aes, key, iv);