blob: 87686bc9c9b1726814c616ae22bf9722e6532a54 [file] [log] [blame]
Test importing and exporting an EC public key in raw format.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Importing raw (uncompressed) public key...
PASS publicKey.toString() is '[object CryptoKey]'
PASS publicKey.type is 'public'
PASS publicKey.usages is []
PASS publicKey.algorithm.name is 'ECDH'
PASS publicKey.algorithm.namedCurve is 'P-256'
Exporting to raw...
PASS: Exported to raw should be [044ea34391aa73885454bc45df3fdcc4a70262fa4621ffe25b5790590c340a4bd9265ef2b3f9a86e2959a960d90323465d60cd4a90d314c5de3f869ad0d4bf6c10] and was
Importing raw (compressed) public key...
PASS publicKey.toString() is '[object CryptoKey]'
PASS publicKey.type is 'public'
PASS publicKey.usages is []
PASS publicKey.algorithm.name is 'ECDH'
PASS publicKey.algorithm.namedCurve is 'P-256'
Exporting to raw...
PASS: Exported to raw should be [044ea34391aa73885454bc45df3fdcc4a70262fa4621ffe25b5790590c340a4bd9265ef2b3f9a86e2959a960d90323465d60cd4a90d314c5de3f869ad0d4bf6c10] and was
Importing invalid raw public key...
error is: DataError
PASS successfullyParsed is true
TEST COMPLETE