2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-15 07:43:22 +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

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