(ret)
| 121 | } |
| 122 | |
| 123 | function 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 | |
| 140 | function parseKeyEncoding(keyType, options = kEmptyObject) { |
| 141 | const { publicKeyEncoding, privateKeyEncoding } = options; |
no test coverage detected
searching dependent graphs…