2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-19 17:53:34 +00:00

AES Additional data can now be entered in a range of formats. #1011

This commit is contained in:
n1474335
2021-02-22 19:33:52 +00:00
parent 32455cd20f
commit 8fadad5891
4 changed files with 105 additions and 46 deletions

View File

@@ -81,8 +81,9 @@ class AESEncrypt extends Operation {
},
{
"name": "Additional Authenticated Data",
"type": "binaryString",
"value": ""
"type": "toggleString",
"value": "",
"toggleValues": ["Hex", "UTF8", "Latin1", "Base64"]
}
];
}
@@ -100,7 +101,7 @@ class AESEncrypt extends Operation {
mode = args[2],
inputType = args[3],
outputType = args[4],
aad = args[5];
aad = Utils.convertToByteString(args[5].string, args[5].option);
if ([16, 24, 32].indexOf(key.length) < 0) {
throw new OperationError(`Invalid key length: ${key.length} bytes