[WebCrypto] Crypto operations should copy their parameters before hoping to another...
[WebKit-https.git] / LayoutTests / http / wpt / crypto / pbkdf2-crash.any.js
1 // META: script=./resources/common.js
2
3 test(() => {
4     const max = 10000;
5     crypto.subtle.importKey('raw', new Uint8Array(32), {name: 'PBKDF2', hash: {name: 'SHA-256'}}, false, ['deriveBits']).then(key => {
6         for (let i = 0; i < max; i++)
7             crypto.subtle.deriveBits({name: 'PBKDF2', hash: {name: 'SHA-256'}, salt: new Uint8Array(32), iterations: 1000}, key, 256);
8     });
9 }, "Test passed if no crashes.");