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

Function handleError

lib/internal/crypto/keygen.js:123–138  ·  view source on GitHub ↗
(ret)

Source from the content-addressed store, hash-verified

121}
122
123function handleError(ret) {
124 if (ret == null)
125 return; // async
126
127 const { 0: err, 1: keys } = ret;
128 if (err !== undefined)
129 throw err;
130
131 const { 0: publicKey, 1: privateKey } = keys;
132
133 // If no encoding was chosen, return key objects instead.
134 return {
135 publicKey: wrapKey(publicKey, PublicKeyObject),
136 privateKey: wrapKey(privateKey, PrivateKeyObject),
137 };
138}
139
140function parseKeyEncoding(keyType, options = kEmptyObject) {
141 const { publicKeyEncoding, privateKeyEncoding } = options;

Callers 1

generateKeyPairSyncFunction · 0.70

Calls 1

wrapKeyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…