Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/test/bake.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
10 changes: 5 additions & 5 deletions src/test/batchBake.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down