Function
measureAsyncParallel
(n, digest, signature, publicKey, keys)
Source from the content-addressed store, hash-verified
| 87 | } |
| 88 | |
| 89 | function measureAsyncParallel(n, digest, signature, publicKey, keys) { |
| 90 | let remaining = n; |
| 91 | function done() { |
| 92 | if (--remaining === 0) |
| 93 | bench.end(n); |
| 94 | } |
| 95 | bench.start(); |
| 96 | for (let i = 0; i < n; ++i) { |
| 97 | crypto.verify( |
| 98 | digest, |
| 99 | data, |
| 100 | publicKey || keys[i], |
| 101 | signature, |
| 102 | done); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | function main({ n, mode, keyFormat, keyType }) { |
| 107 | pems ||= [...Buffer.alloc(n)].map(() => keyFixtures[keyType].publicKey); |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…