Tests bad algorithm inputs for AES-CTR
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Importing AES-CBC key...
encrypt() with counter null...
error is: TypeError: Failed to execute 'encrypt' on 'SubtleCrypto': AesCtrParams: counter: Not a BufferSource
encrypt() without counter...
error is: TypeError: Failed to execute 'encrypt' on 'SubtleCrypto': AesCtrParams: counter: Missing required property
encrypt() without length...
error is: TypeError: Failed to execute 'encrypt' on 'SubtleCrypto': AesCtrParams: length: Missing required property
encrypt() with a length of 256...
error is: TypeError: Failed to execute 'encrypt' on 'SubtleCrypto': AesCtrParams: length: Outside of numeric range
encrypt() with a length of -3...
error is: TypeError: Failed to execute 'encrypt' on 'SubtleCrypto': AesCtrParams: length: Outside of numeric range
encrypt() with length that is Infinity...
error is: TypeError: Failed to execute 'encrypt' on 'SubtleCrypto': AesCtrParams: length: Outside of numeric range
PASS successfullyParsed is true
TEST COMPLETE