blob: 3c88fb888e3b1f3e48fccf20001e487ed9f033c1 [file] [log] [blame]
Test encrypting using AES-CTR with malformed parameters
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS crypto.subtle.encrypt({name: "aes-ctr", counter: asciiToUint8Array("jnOw99oOZFLIEPMr"), length: -1}, key, plainText) rejected promise with TypeError: Value -1 is outside the range [0, 255].
PASS crypto.subtle.encrypt({name: "aes-ctr", counter: asciiToUint8Array("jnOw99oOZFLIEPMr"), length: 0}, key, plainText) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS crypto.subtle.encrypt({name: "aes-ctr", counter: asciiToUint8Array("jnOw99oOZFLIEPMr"), length: 129}, key, plainText) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS crypto.subtle.encrypt({name: "aes-ctr", counter: asciiToUint8Array("jnOw99oOZFLIEPMr"), length: 1}, key, plainText) rejected promise with OperationError: The operation failed for an operation-specific reason.
PASS successfullyParsed is true
TEST COMPLETE