Fix AES decryption in GCM mode not using IVs.

Updated tests to match new results.
Included a Python script to generate AES-GCM tests
This commit is contained in:
j433866 2019-08-22 14:54:58 +01:00
parent 19553dcfed
commit 737ea19c9e
2 changed files with 44 additions and 8 deletions

View file

@ -71,8 +71,8 @@ class AESDecrypt extends Operation {
* @throws {OperationError} if cannot decrypt input or invalid key length
*/
run(input, args) {
const key = Utils.convertToByteArray(args[0].string, args[0].option),
iv = Utils.convertToByteArray(args[1].string, args[1].option),
const key = Utils.convertToByteString(args[0].string, args[0].option),
iv = Utils.convertToByteString(args[1].string, args[1].option),
mode = args[2],
inputType = args[3],
outputType = args[4],