From a59de80d189017bab8eb0aaa89be17e145b517bb Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Thu, 26 Sep 2019 21:41:35 +0100 Subject: [PATCH] Update node API tests --- tests/node/tests/operations.mjs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/node/tests/operations.mjs b/tests/node/tests/operations.mjs index ac846d93..75f37ab1 100644 --- a/tests/node/tests/operations.mjs +++ b/tests/node/tests/operations.mjs @@ -70,13 +70,13 @@ TestRegister.addApiTests([ }), it("AES decrypt: toggleString and option", () => { - const result = AESDecrypt("812c34ae6af353244a63c6ce23b7c34286b60be28ea4645523d4494700e7", { + const result = AESDecrypt("4a123af235a507bbc9d5871721d61b98504d569a9a5a7847e2d78315fec7", { key: { string: "some longer key1", option: "utf8", }, iv: { - string: "some iv", + string: "some iv some iv1", option: "utf8", }, mode: "OFB", @@ -916,8 +916,13 @@ smothering ampersand abreast it("Triple DES encrypt / decrypt", () => { assert.strictEqual( chef.tripleDESDecrypt( - chef.tripleDESEncrypt("Destroy Money", {key: {string: "30 31 2f 30 34 2f 31 39 39 39 20 32 32 3a 33 33 3a 30 3130 31 2f 30 34", option: "Hex"}}), - {key: {string: "30 31 2f 30 34 2f 31 39 39 39 20 32 32 3a 33 33 3a 30 3130 31 2f 30 34", option: "Hex"}}).toString(), + chef.tripleDESEncrypt("Destroy Money", { + key: {string: "30 31 2f 30 34 2f 31 39 39 39 20 32 32 3a 33 33 3a 30 3130 31 2f 30 34", option: "Hex"}, + iv: {string: "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00", option: "Hex"}}), + { + key: {string: "30 31 2f 30 34 2f 31 39 39 39 20 32 32 3a 33 33 3a 30 3130 31 2f 30 34", option: "Hex"}, + iv: {string: "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00", option: "Hex"} + }).toString(), "Destroy Money"); }),