Skip to content

Commit 652621d

Browse files
Update tests for new AES Encrypt functionality in CyberChef 10.22.1 (#86)
1 parent f50e287 commit 652621d

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/test/bake.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ describe("POST /bake", function() {
137137
.send({
138138
input: "irrelevant",
139139
recipe: {
140-
op: "AES Encrypt",
141-
args: {
142-
key: "notsixteencharslong"
143-
}
140+
"op": "AES Encrypt",
141+
"args": [
142+
{ "option": "UTF8", "string": "notsixteencharslong" }, { "option": "Hex", "string": "" }, "CBC", "Raw", "Hex", { "option": "Hex", "string": "" }
143+
]
144144
}
145145
})
146146
.expect(400)
147-
.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);
147+
.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);
148148
});
149149

150150
it("should return a string output as a byte array, if outputType is defined", (done) => {

src/test/batchBake.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,16 @@ describe("POST /batch/bake", function() {
201201
.send({
202202
input: ["irrelevant"],
203203
recipe: {
204-
op: "AES Encrypt",
205-
args: {
206-
key: "notsixteencharslong"
207-
}
204+
"op": "AES Encrypt",
205+
"args": [
206+
{ "option": "UTF8", "string": "notsixteencharslong" }, { "option": "Hex", "string": "" }, "CBC", "Raw", "Hex", { "option": "Hex", "string": "" }
207+
]
208208
}
209209
})
210210
.expect(200)
211211
.expect([{
212212
success: false,
213-
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"
213+
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"
214214
}], done);
215215
});
216216

0 commit comments

Comments
 (0)