blob: a3b5d0edf85334407c68116255d405e6b210d3a0 [file] [log] [blame]
// META: script=./resources/common.js
test(() => {
const max = 10000;
const wrappedKey = hexStringToUint8Array( "7aedac7ca0885c4c8340e7414b45b160a872c38eb56f25fa17eeb885abcbd72ce35fb0d8dcfa023dcb0bf94b0fe2a98a693b30e8a993207d646f2b14f673eddddc53815cb3b63cadf3b275bd0c387276e792fbdfd0bab94951ce109ff42ad4c739e5bd6e3f21140d0de7fbd3b60b8a05b29e1aae6385ced993546140a143db854d5b54e2a5d0be425d2aa8a4eee00b779a7b905c3e7fc4a91c37582871eb0b6daddba5d9497271e82e71589a31058fe0c38a7506f72acbc70f88139654cb1a26580f9c20b228c8f22865233d6a705eb68249a906f7d022ef28c84a5dccba26455391f4ce3572e9cfa50b7b4cefcdadf1eec50afc1df31a43f9dda40cd14524aa075b8f081a8b708ce1214b8ec0bd1c9a9af21596d7520b032a7588edaff8116e8710b47f8cda2caace8386cf176507c664f2757d3d728f6ea3be81abe58f36f751a32833d8689b7008a66b72d325ae729bb1064e88ace17c767c376d5c88eff8e8f1cf377639e66390614af43b4aa171fe144ad69c5a0d4d5d4129461da5250fb389b0eb0d53e65263a4b6265ad3fc0d375d42426f3ca1373c044aa47ec9973c77c46ae34f07ba6cc7d43c56438a9d678bf961f7bd7a4155f7cf813dd7a6fe434f04f052d86f5fc79813e85c0817f952e13e99ddea5d21d92e517a8f269a8da660c1d1432ad2d476bd2d13c1f3207b0a5c3f0f250fc195f406e89c1c107d5733cbaaacefc411ea7377880caa09847560b4dfe86f1ce8a0aac3d142eb9aa315a7e36383b5aa4f027f6ee6603053dd877e57755ae13a0b01453b3806610f98ed85ea574a2c040d0df9e861091f72a285fb563da4ac9d6098a2e4cf232455d8529e80ec8b9334690bca941caa8d8c6c2ebb29c73176c736b2e1cd897aaecdb7d51fbf2eeb5716bb441c0a2646643530f1618a5923b7fe3c6d8fcd55ec18ddbc5053d09af3f3ca058b3471d3cc327cdcdaa8a0dcada0dd3e52365d5ad2d36643769e8f274ef2020ce47975dceefb1fa3a4ff092927ebd2dc9017b4e36ab0591358a65c98d981f1e687e9cde16b3953b0f4b5a8f0b305fdfbbc60d11046d633a8c96e705290300a145a58f61983a3b95dc57615863faa2c217f3656a627b6a3e438ff55cd87c6462699a3db064213f30831e8be8d058ea6313af2d468904dfa544b4caf0598fcb2e59d5a1b4ee022f32e86b4ef0fd2e55ecb38edc114758d97718bc3c43f300614554a19320b7c7687d3d2218bb7fef7a01950c028c14f0bdede849924c0cab8161a7d0600d46f9e37bdbb7f7b2d3ca72e75eb6da10e015c5c2bed171ac50ff94a3291a6fc5b5a093d4c9cfbc269fc4f295c881676706f1fadda515c6f9441f5f05af0a8255706b18f8b76bf4b5f729cddea05b099470f02f71df46a3b0b53ec5429bdfd29c9c50f72c0359bdf4ee7435dcbc415fa5b2633ebdc5d6213fe5eefcfdeda6a14b9f4d9ba837afae59549a31428a9ead0c3e32c66cf93e42d5b0266e0ad7d6ed5027923c6d0eb8191f55d987a2ebf4c87f4d49c1b75c3e938c8c54d502877e54ef1fbae0851e6b55c3fbc443fe6ae1ef97aa4d4c4a0dd7a74191fa72bf1f127b63001f36c9b3d1bb8d9d1fe609cf24423b84cc96afed8e38508efb9bf01638ca75abcc46fc371aac26c493ee9b0a71c95e310eeb30460ef6baf622cbc74c89b01558d0913e4394369a782d3536c8ca0b90aaf087004a7d18836c0b9d45a48fd235a12e687d80c6e");
const rawKey = asciiToUint8Array("jnOw99oOZFLIEPMr");
const aesCbcParams = {
name: "aes-cbc",
iv: asciiToUint8Array("jnOw99oOZFLIEPMr"),
};
crypto.subtle.importKey('raw', rawKey, "aes-cbc", false, ["unwrapKey"]).then(key => {
for (let i = 0; i < max; i++)
crypto.subtle.unwrapKey("pkcs8", wrappedKey, key, aesCbcParams, {name: "rsa-oaep", hash: "sha-1"}, false, ["decrypt"]);
});
}, "Test passed if no crashes.");