| Tests deriveKey() with various bad parameters for PBKDF2 |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| Importing the password... |
| |
| Deriving an AES key with no length... |
| error is: TypeError: Failed to execute 'deriveKey' on 'SubtleCrypto': AesDerivedKeyParams: length: Missing required property |
| |
| Deriving an AES key with bad length... |
| error is: OperationError: AES key length must be 128 or 256 bits |
| |
| Deriving an AES key with unsupported length... |
| error is: OperationError: 192-bit AES keys are not supported |
| |
| Deriving an AES-CBC key with unsupported usage (sign)... |
| error is: SyntaxError: Cannot create a key using the specified key usages. |
| |
| Deriving a zero-length HMAC key... |
| error is: TypeError: HMAC key length must not be zero |
| |
| Deriving an ECDH key... |
| error is: NotSupportedError: Failed to execute 'deriveKey' on 'SubtleCrypto': ECDH: Unsupported operation: get key length |
| |
| Deriving an RSA-OAEP key... |
| error is: NotSupportedError: Failed to execute 'deriveKey' on 'SubtleCrypto': RSA-OAEP: Unsupported operation: get key length |
| |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |