diff --git a/src/test/bake.mjs b/src/test/bake.mjs index 2cc586c..bf094c0 100644 --- a/src/test/bake.mjs +++ b/src/test/bake.mjs @@ -137,14 +137,14 @@ describe("POST /bake", function() { .send({ input: "irrelevant", recipe: { - op: "AES Encrypt", - args: { - key: "notsixteencharslong" - } + "op": "AES Encrypt", + "args": [ + { "option": "UTF8", "string": "notsixteencharslong" }, { "option": "Hex", "string": "" }, "CBC", "Raw", "Hex", { "option": "Hex", "string": "" } + ] } }) .expect(400) - .expect("Invalid key length: 3 bytes\n\nThe following algorithms will be used based on the size of the key:\n 16 bytes = AES-128\n 24 bytes = AES-192\n 32 bytes = AES-256", done); + .expect("Invalid key length: 19 bytes\n\nThe following algorithms will be used based on the size of the key:\n 16 bytes = AES-128\n 24 bytes = AES-192\n 32 bytes = AES-256", done); }); it("should return a string output as a byte array, if outputType is defined", (done) => { diff --git a/src/test/batchBake.mjs b/src/test/batchBake.mjs index d540da3..95f70aa 100644 --- a/src/test/batchBake.mjs +++ b/src/test/batchBake.mjs @@ -201,16 +201,16 @@ describe("POST /batch/bake", function() { .send({ input: ["irrelevant"], recipe: { - op: "AES Encrypt", - args: { - key: "notsixteencharslong" - } + "op": "AES Encrypt", + "args": [ + { "option": "UTF8", "string": "notsixteencharslong" }, { "option": "Hex", "string": "" }, "CBC", "Raw", "Hex", { "option": "Hex", "string": "" } + ] } }) .expect(200) .expect([{ success: false, - error: "Invalid key length: 3 bytes\n\nThe following algorithms will be used based on the size of the key:\n 16 bytes = AES-128\n 24 bytes = AES-192\n 32 bytes = AES-256" + error: "Invalid key length: 19 bytes\n\nThe following algorithms will be used based on the size of the key:\n 16 bytes = AES-128\n 24 bytes = AES-192\n 32 bytes = AES-256" }], done); });