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

Function dhComputeSecret

lib/internal/crypto/diffiehellman.js:170–176  ·  view source on GitHub ↗
(key, inEnc, outEnc)

Source from the content-addressed store, hash-verified

168 dhComputeSecret;
169
170function dhComputeSecret(key, inEnc, outEnc) {
171 key = getArrayBufferOrView(key, 'key', inEnc);
172 const ret = this[kHandle].computeSecret(key);
173 if (typeof ret === 'string')
174 throw new ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY();
175 return encode(ret, outEnc);
176}
177
178
179DiffieHellmanGroup.prototype.getPrime =

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…