MCPcopy Index your code
hub / github.com/nodejs/node / createSigningKeys

Function createSigningKeys

benchmark/crypto/webcrypto-hmac.js:31–42  ·  view source on GitHub ↗
(n, hash, keylen)

Source from the content-addressed store, hash-verified

29});
30
31async function createSigningKeys(n, hash, keylen) {
32 keys = new Array(n);
33 currentHash = hash;
34 currentKeyLength = keylen;
35
36 const algorithm = { name: 'HMAC', hash, length: keylen };
37 const key = await subtle.generateKey(algorithm, true, ['sign']);
38 const raw = await subtle.exportKey('raw', key);
39 for (let i = 0; i < n; ++i) {
40 keys[i] = await subtle.importKey('raw', raw, algorithm, false, ['sign']);
41 }
42}
43
44async function measureSerial(n, sharedKey, data) {
45 bench.start();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…