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

Function setUpBaseKeys

test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/argon2.js:46–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 });
45
46 function setUpBaseKeys() {
47 var promises = [];
48 var baseKeys = {};
49
50 testVectors.forEach(function (vector) {
51 var algorithmName = vector.algorithm;
52 var password = vector.password;
53
54 promises.push(
55 subtle
56 .importKey('raw-secret', password, algorithmName, false, [
57 'deriveBits',
58 ])
59 .then(function (key) {
60 baseKeys[algorithmName] = key;
61 })
62 );
63 });
64
65 return Promise.all(promises).then(function () {
66 return {
67 baseKeys: baseKeys,
68 };
69 });
70 }
71}

Callers 1

define_testsFunction · 0.70

Calls 4

allMethod · 0.80
forEachMethod · 0.65
pushMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected