1 Tests deriveKey() with various bad parameters for PBKDF2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Importing the password...
8 Deriving an AES key with no length...
9 error is: TypeError: AesDerivedKeyParams: length: Missing required property
11 Deriving an AES key with bad length...
12 error is: OperationError: AES key length must be 128 or 256 bits
14 Deriving an AES key with unsupported length...
15 error is: OperationError: 192-bit AES keys are not supported
17 Deriving an AES-CBC key with unsupported usage (sign)...
18 error is: SyntaxError: Cannot create a key using the specified key usages.
20 Deriving a zero-length HMAC key...
21 error is: TypeError: HMAC key length must not be zero
23 Deriving an ECDH key...
24 error is: NotSupportedError: ECDH: Unsupported operation: get key length
26 Deriving an RSA-OAEP key...
27 error is: NotSupportedError: RSA-OAEP: Unsupported operation: get key length
29 PASS successfullyParsed is true