| importScripts('../../../../resources/js-test-pre.js'); |
| importScripts("../../../resources/common.js"); |
| description("Test exporting a RSA-OAEP public key with SPKI format in workers."); |
| publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // Equivalent to 65537 |
| debug("Generating a key pair..."); |
| crypto.subtle.generateKey(algorithmKeyGen, extractable, ["decrypt", "encrypt", "wrapKey", "unwrapKey"]).then(function(result) { |
| debug("Exporting the public key..."); |
| return crypto.subtle.exportKey("spki", keyPair.publicKey); |
| }).then(function(result) { |
| shouldBe("publicKey.byteLength", "294"); |