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

Method from

lib/internal/crypto/keys.js:191–203  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

189 }
190
191 static from(key) {
192 if (!isCryptoKey(key))
193 throw new ERR_INVALID_ARG_TYPE('key', 'CryptoKey', key);
194 maybeEmitDEP0204(key);
195 const handle = getCryptoKeyHandle(key);
196 switch (getCryptoKeyType(key)) {
197 /* eslint-disable no-use-before-define */
198 case 'secret': return new SecretKeyObject(handle);
199 case 'public': return new PublicKeyObject(handle);
200 case 'private': return new PrivateKeyObject(handle);
201 /* eslint-enable no-use-before-define */
202 }
203 }
204
205 equals(otherKeyObject) {
206 if (!isKeyObject(otherKeyObject)) {

Callers 15

hexToRgbFunction · 0.45
ClientRequestFunction · 0.45
processHeaderFunction · 0.45
_http_outgoing.jsFile · 0.45
exportStringFunction · 0.45
sliceBufferFunction · 0.45
fixBufferListFunction · 0.45
dgram.jsFile · 0.45
tls.jsFile · 0.45
zlibBufferFunction · 0.45
zlibBufferSyncFunction · 0.45
zlib.jsFile · 0.45

Calls 3

isCryptoKeyFunction · 0.85
getCryptoKeyHandleFunction · 0.85
getCryptoKeyTypeFunction · 0.85

Tested by

no test coverage detected