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

Function asymmetricVectors

test/parallel/test-crypto-key-objects-to-crypto-key.js:191–202  ·  view source on GitHub ↗
(keyPair, algorithm, usagesByType, expected)

Source from the content-addressed store, hash-verified

189}
190
191function asymmetricVectors(keyPair, algorithm, usagesByType, expected) {
192 const { publicKey, privateKey } = keyPair;
193 const vectors = [];
194 for (const keyObject of [publicKey, privateKey]) {
195 vectors.push(vector(
196 keyObject,
197 algorithm,
198 getUsages(keyObject, usagesByType),
199 expected));
200 }
201 return vectors;
202}
203
204function rsaVectors(name, usagesByType) {
205 const keyPair = generateKeyPairSync('rsa', { modulusLength: 2048 });

Callers 2

cfrgVectorsFunction · 0.85
simpleAsymmetricVectorsFunction · 0.85

Calls 3

vectorFunction · 0.70
getUsagesFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected