Skip to content

doc: fix return type

Rodrigo Muino Tomonari requested to merge github/fork/exoego/doc-crypto into master

IIUC, crypto.createDiffieHellmanGroup(name) and its original crypto.getDiffieHellman(groupName) will return a instance of DiffieHellmanGroup which is not a sub type of DiffieHellman.

const instnace = crypto.createDiffieHellmanGroup("modp14")

console.log(instnace instanceof crypto.DiffieHellmanGroup)
// true
console.log(instnace instanceof crypto.DiffieHellman)
// false

on Node.js v12.10.0.

Checklist

Merge request reports

Loading