( noBits, size, saltSize, hash, iterations)
| 488 | } |
| 489 | |
| 490 | async function testDeriveBitsBadUsage( |
| 491 | noBits, |
| 492 | size, |
| 493 | saltSize, |
| 494 | hash, |
| 495 | iterations) { |
| 496 | const algorithm = { |
| 497 | name: 'PBKDF2', |
| 498 | salt: Buffer.from(kSalts[saltSize], 'hex'), |
| 499 | iterations, |
| 500 | hash, |
| 501 | }; |
| 502 | |
| 503 | return assert.rejects( |
| 504 | subtle.deriveBits(algorithm, noBits[size], 256), { |
| 505 | message: /baseKey does not have deriveBits usage/, |
| 506 | }); |
| 507 | } |
| 508 | |
| 509 | |
| 510 | async function testDeriveKey( |
no test coverage detected