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

Method checkPrivateKey

lib/internal/crypto/x509.js:376–382  ·  view source on GitHub ↗
(pkey)

Source from the content-addressed store, hash-verified

374 }
375
376 checkPrivateKey(pkey) {
377 if (!isKeyObject(pkey))
378 throw new ERR_INVALID_ARG_TYPE('pkey', 'KeyObject', pkey);
379 if (getKeyObjectType(pkey) !== 'private')
380 throw new ERR_INVALID_ARG_VALUE('pkey', pkey);
381 return this[kHandle].checkPrivateKey(getKeyObjectHandle(pkey));
382 }
383
384 verify(pkey) {
385 if (!isKeyObject(pkey))

Calls 3

isKeyObjectFunction · 0.85
getKeyObjectTypeFunction · 0.85
getKeyObjectHandleFunction · 0.85

Tested by

no test coverage detected