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

Function createPrivateKey

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

Source from the content-addressed store, hash-verified

843}
844
845function createPrivateKey(key) {
846 const { format, type, data, passphrase, namedCurve } =
847 prepareAsymmetricKey(key, kCreatePrivate);
848 const handle = new KeyObjectHandle();
849 handle.init(kKeyTypePrivate, data, format ?? null,
850 type ?? null, passphrase ?? null, namedCurve ?? null);
851 return new PrivateKeyObject(handle);
852}
853
854function keyObjectTypeToString(type) {
855 switch (type) {

Calls 2

prepareAsymmetricKeyFunction · 0.85
initMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…