MCPcopy Create free account
hub / github.com/nodejs/node / testDeriveBitsBadUsage

Function testDeriveBitsBadUsage

test/pummel/test-webcrypto-derivebits-pbkdf2.js:490–507  ·  view source on GitHub ↗
(
  noBits,
  size,
  saltSize,
  hash,
  iterations)

Source from the content-addressed store, hash-verified

488}
489
490async 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
510async function testDeriveKey(

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected