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

Function combinationFilter

benchmark/crypto/kem.js:55–70  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

53 n: [1e3],
54}, {
55 combinationFilter(p) {
56 // "keyObject.unique" allows to compare the result with "keyObject" to
57 // assess whether mutexes over the key material impact the operation
58 if (p.keyFormat === 'keyObject.unique')
59 return p.mode === 'async-parallel';
60 // raw-public is only supported for encapsulate, not rsa
61 if (p.keyFormat === 'raw-public')
62 return p.keyType !== 'rsa' && p.op === 'encapsulate';
63 // raw-private is not supported for rsa and ml-kem, only for decapsulate
64 if (p.keyFormat === 'raw-private')
65 return p.keyType !== 'rsa' && !p.keyType.startsWith('ml-') && p.op === 'decapsulate';
66 // raw-seed is only supported for ml-kem
67 if (p.keyFormat === 'raw-seed')
68 return p.keyType.startsWith('ml-');
69 return true;
70 },
71});
72
73function measureSync(n, op, key, keys, ciphertexts) {

Callers 1

recursiveMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected