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

Function getFormat

lib/internal/crypto/diffiehellman.js:274–284  ·  view source on GitHub ↗
(format)

Source from the content-addressed store, hash-verified

272}
273
274function getFormat(format) {
275 if (format) {
276 if (format === 'compressed')
277 return POINT_CONVERSION_COMPRESSED;
278 if (format === 'hybrid')
279 return POINT_CONVERSION_HYBRID;
280 if (format !== 'uncompressed')
281 throw new ERR_CRYPTO_ECDH_INVALID_FORMAT(format);
282 }
283 return POINT_CONVERSION_UNCOMPRESSED;
284}
285
286const dhEnabledKeyTypes = new SafeSet(['dh', 'ec', 'x448', 'x25519']);
287

Callers 1

diffiehellman.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…